|
1 |
| -name: Deploy Site |
2 |
| - |
| 1 | +name: Deploy site |
3 | 2 | on: [push]
|
4 |
| - |
5 | 3 | jobs:
|
6 |
| - build-website: |
7 |
| - name: Website build |
| 4 | + deploy: |
| 5 | + name: Linux Ubuntu 22.04 |
8 | 6 | runs-on: ubuntu-latest
|
9 | 7 | steps:
|
10 | 8 | - name: Checkout
|
11 |
| - uses: actions/checkout@v2 |
12 |
| - - name: Install node |
13 |
| - uses: actions/setup-node@v2 |
| 9 | + uses: actions/checkout@v3 |
14 | 10 | 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 |
19 | 14 | 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 |
33 | 31 | - 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' |
35 | 33 | uses: peaceiris/actions-gh-pages@v3
|
36 | 34 | with:
|
37 | 35 | github_token: ${{ secrets.GITHUB_TOKEN }}
|
38 | 36 | publish_branch: www
|
39 |
| - publish_dir: ./public |
| 37 | + publish_dir: ./_site |
40 | 38 | force_orphan: true
|
0 commit comments