-
Notifications
You must be signed in to change notification settings - Fork 4
52 lines (47 loc) · 1.47 KB
/
deploy-dev.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
41
42
43
44
45
46
47
48
49
50
51
52
name: Build and Deploy Staging Branch
on:
push:
branches: [ staging ]
paths-ignore:
- 'ios/**'
- 'android/**'
- '.vscode/**'
- '**.md'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
path: 'build'
# https://github.com/actions/checkout#push-a-commit-using-the-built-in-token
- name: Set GitHub Actions as Commit Author
run: |
git config --global user.name github-actions
git config --global user.email github-actions@github.com
- name: Build
run: |
cd build
echo "VITE_BASE_URL=/acchymns-dev/" > .env # We deploy to github.io/acchyms-dev, which we serve on the root
npm i
npm run deploy-check
npm run build
npx cap copy web # This runs our helper script to compress the song book info
cd ..
- name: Checkout Dev Target
uses: actions/checkout@v4
with:
repository: ACC-Hymns/acchymns-dev
path: 'deploy'
token: ${{ secrets.DEPLOYMENT_PAT }}
- name: Push files to target
run: |
rm -r deploy/*
mv build/dist/* deploy
cp deploy/index.html deploy/404.html # This is to avoid 404 errors on reload (Ugly fix but okay I guess)
cd deploy
touch .nojekyll
git add .
git commit -m $GITHUB_SHA
git push