forked from MartinBuessemeyer/ETF-Pension-Plan-Visualization
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (41 loc) · 1.14 KB
/
deploy.yml
File metadata and controls
43 lines (41 loc) · 1.14 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
name: Deploy website
on:
push:
branches:
- master
workflow_dispatch:
jobs:
deploy:
name: Deploy website
runs-on: ubuntu-latest
steps:
- name: Initialize Node.js environment
uses: actions/setup-node@v2
- name: Check out code
uses: actions/checkout@v2
with:
path: src
- name: Check out deploy branch
uses: actions/checkout@v2
with:
ref: deploy
path: deploy
- name: Clean up output
run: git rm -rf *
working-directory: deploy
- name: Set up dependencies
run: npm install
working-directory: src
- name: Build website
run: CI=false npm run build
working-directory: src
- name: Copy website
run: cp -r src/build/* deploy
- name: Commit result
run: |
git config user.email "${{ github.event.pusher.email }}"
git config user.name "${{ github.event.pusher.name }}"
git add *
git diff-index --quiet HEAD || git commit -m "deploy: ${{ github.event.head_commit.message }}"
git push
working-directory: deploy