-
Notifications
You must be signed in to change notification settings - Fork 49
50 lines (40 loc) · 1.39 KB
/
Publish-Website.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: Publish the mkdocs to gh-pages
on:
pull_request:
push:
branches:
- master
env:
GRADLE_OPTS: -Dorg.gradle.configureondemand=true -Dorg.gradle.parallel=true -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-Xmx3g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"
jobs:
deploy-website:
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Hermit
run: ./bin/hermit env -r >> $GITHUB_ENV
- name: Cache Gradle packages
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Prep mkdocs
run: .github/workflows/prepare_mkdocs.sh
- name: Build mkdocs
run: |
pip3 install mkdocs mkdocs-material mkdocs-macros-plugin
mkdocs build
- name: Deploy 🚀
if: success() && github.ref == 'refs/heads/master'
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GH_CLIPPY_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: site # The folder the action should deploy.
SINGLE_COMMIT: true