-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (41 loc) · 1.18 KB
/
deploy.yml
File metadata and controls
51 lines (41 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Deploy to Clever Cloud
on:
push:
branches: [main]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: oven-sh/setup-bun@v2
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
- run: bun install
- name: Build
run: bun run build
- name: Typecheck
run: bun run typecheck
- name: Test
run: bun test src/
deploy:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Push to Clever Cloud
env:
CLEVER_TOKEN: ${{ secrets.CLEVER_TOKEN }}
CLEVER_SECRET: ${{ secrets.CLEVER_SECRET }}
CLEVER_GIT_URL: ${{ secrets.CLEVER_GIT_URL }}
run: |
CLEVER_HOST=$(echo "$CLEVER_GIT_URL" | sed 's|https://||' | cut -d'/' -f1)
git credential-store --file=/tmp/git-creds store <<EOF
protocol=https
host=${CLEVER_HOST}
username=${CLEVER_TOKEN}
password=${CLEVER_SECRET}
EOF
git config credential.helper "store --file=/tmp/git-creds"
git push "${CLEVER_GIT_URL}" main:master --force