-
Notifications
You must be signed in to change notification settings - Fork 18
45 lines (39 loc) · 1.03 KB
/
update-website.yaml
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: Update Website
on:
# Run on successful merge from main to gh-pages branch via workflow
workflow_run:
workflows:
- Merge Pages
types:
- completed
workflow_dispatch: # Allow manual launch on click
jobs:
update:
# Don't run on forks
if: github.repository_owner == 'SuLab'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: gh-pages
token: ${{ github.token }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Build Webstie
run: |
python parse.py
- name: Commit latest build
if: ${{ success() }}
uses: EndBug/add-and-commit@v7
with:
branch: gh-pages
message: "Update to Website"
add: "['pages', 'images', '_data']"