-
Notifications
You must be signed in to change notification settings - Fork 6
50 lines (50 loc) · 1.71 KB
/
build.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
49
50
name: Deploy site
on:
push: { branches: [master] }
workflow_dispatch: { branches: [master] }
jobs:
deploy:
name: Linux Ubuntu 22.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # needed for accurate dates and blog plugin
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install Poetry
run: python3 -m pip install --upgrade poetry
- name: Cache build data
uses: actions/cache@v3
with:
key: mkdocs-cache-${{ runner.os }}-${{ hashFiles('**/poetry.lock', '**/mkdocs.yml') }}
path: .cache
- name: Install dependencies
run: poetry install
- name: Download assets
run: |
poetry run python3 scripts/assets/download.py get_assets
poetry run python3 scripts/assets/download.py get_bs5
poetry run python3 scripts/assets/download.py get_fa
- name: Download sfz database
run: |
mkdir -p data/sfz
poetry run python scripts/assets/download.py get \
https://raw.githubusercontent.com/sfzformat/sfzformat.github.io/source/data/sfz/syntax.yml \
data/sfz \
True
- name: Build assets
run: poetry run python3 scripts/assets/uglify.py
- name: Build site
run: poetry run mkdocs build
- name: Upload to GitHub pages
if: github.ref_name == 'master' && github.event_name != 'pull_request'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: www
publish_dir: ./_site
force_orphan: true