-
Notifications
You must be signed in to change notification settings - Fork 40
46 lines (38 loc) · 964 Bytes
/
frontend.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
name: Build frontend
on: [push, pull_request]
jobs:
build-and-deploy-if-main:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install node
uses: actions/setup-node@v1
with:
node-version: '16.15.1'
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install Scivision.Py
run: |
pip install .
- name: Install node packages
working-directory: frontend
run: npm ci
- name: Build
working-directory: frontend
env:
CI: ""
run: |
npm run build
pwd
ls
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4.2.2
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: frontend/build
clean: true