Skip to content

Commit dfbe90f

Browse files
committed
GH Actions: replace Jekyll build with MKDocs
1 parent 6b5099a commit dfbe90f

File tree

1 file changed

+25
-27
lines changed

1 file changed

+25
-27
lines changed

.github/workflows/build.yml

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,38 @@
1-
name: Deploy Site
2-
1+
name: Deploy site
32
on: [push]
4-
53
jobs:
6-
build-website:
7-
name: Website build
4+
deploy:
5+
name: Linux Ubuntu 22.04
86
runs-on: ubuntu-latest
97
steps:
108
- name: Checkout
11-
uses: actions/checkout@v2
12-
- name: Install node
13-
uses: actions/setup-node@v2
9+
uses: actions/checkout@v3
1410
with:
15-
node-version: '14'
16-
cache: 'yarn'
17-
- name: Install ruby
18-
uses: ruby/setup-ruby@v1
11+
fetch-depth: 0 # needed for accurate dates and blog plugin
12+
- name: Install Python
13+
uses: actions/setup-python@v4
1914
with:
20-
ruby-version: 2.7
21-
bundler-cache: true
22-
- name: Generate assets
23-
run: yarn --no-bin-links && yarn dist
24-
- name: Build fork
25-
if: ${{ github.repository_owner != 'sfztools' }}
26-
run: |
27-
bundle exec jekyll build \
28-
--destination public/ \
29-
--baseurl "/$(echo '${{ github.repository }}' | cut -d/ -f2)"
30-
- name: Build sfztools
31-
if: ${{ github.repository_owner == 'sfztools' }}
32-
run: bundle exec jekyll build --destination public/
15+
python-version: 3.x
16+
- name: Install Poetry
17+
run: python3 -m pip install --upgrade poetry
18+
- name: Cache build data
19+
uses: actions/cache@v3
20+
with:
21+
key: mkdocs-cache-${{ runner.os }}-${{ hashFiles('**/poetry.lock', '**/mkdocs.yml') }}
22+
path: .cache
23+
- name: Install dependencies
24+
run: poetry install
25+
- name: Download assets
26+
run: poetry run python3 scripts/assets/download.py
27+
- name: Build assets
28+
run: poetry run python3 scripts/assets/uglify.py
29+
- name: Build site
30+
run: poetry run mkdocs build
3331
- name: Upload to GitHub pages
34-
if: ${{ github.ref_name == 'master' && github.event_name != 'pull_request' }}
32+
if: github.ref_name == 'master' && github.event_name != 'pull_request'
3533
uses: peaceiris/actions-gh-pages@v3
3634
with:
3735
github_token: ${{ secrets.GITHUB_TOKEN }}
3836
publish_branch: www
39-
publish_dir: ./public
37+
publish_dir: ./_site
4038
force_orphan: true

0 commit comments

Comments
 (0)