-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (38 loc) · 1010 Bytes
/
deploy.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: Deploy
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./sankey_dashboard
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
cache-dependency-path: '**/package-lock.json'
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Build
env:
NODE_ENV: production
run: npm run build
- name: Commit the build dir
run: |
cd build
git init
git add -A
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git commit -m 'deploy' -a || true
- name: Push changes to gh-pages
uses: ad-m/github-push-action@master
with:
branch: gh-pages
directory: build
force: true
github_token: ${{ secrets.GITHUB_TOKEN }}