-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (43 loc) · 1.43 KB
/
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
41
42
43
44
45
46
47
48
name: Build, Test, and (maybe) Deploy React Application
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
build_test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
python-version: [3.9]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install aqtinstall - requirement for functional tests
run: pip install aqtinstall==3.1.*
- name: yarn install, build and test
run: |
yarn install --immutable --immutable-cache --check-cache
yarn run build --if-present
yarn test --coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: deploy to gh-pages
if: github.ref == 'refs/heads/main' && github.actor == github.repository_owner
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build