-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (38 loc) · 1023 Bytes
/
staging.yml
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
name: Staging
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Prepare Remote
uses: appleboy/ssh-action@v1.0.3
with:
host: publisher-services.podlove.dev
username: root
key: ${{ secrets.STAGING_SSH_KEY }}
script: |
mkdir -p app
cd app
( [ ! -d ".git" ] && git clone -–depth=1 git@github.com:podlove/publisher-next.git . ) || true
- name: Deploy to staging environment
uses: appleboy/ssh-action@v1.0.3
env:
SHA: ${{ github.sha }}
VITE_BUILD: ${{ github.sha }}
with:
host: publisher-services.podlove.dev
username: root
key: ${{ secrets.STAGING_SSH_KEY }}
envs: SHA,VITE_BUILD
script: |
cd app
git fetch
git reset --hard $SHA
devbox install
devbox services down
devbox run bootstrap
devbox run build
devbox services up --background