-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (53 loc) · 1.41 KB
/
docs.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
51
52
53
54
55
56
57
58
59
60
61
62
name: Docs
on:
push:
branches:
- master
- docs
paths:
- '**.yml'
- docs/**
pull_request:
branches:
- master
paths:
- '**.yml'
- docs/**
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
publish-doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Setup MkDocs
run: |
pip install -r requirements.txt
- name: Check out GitHub page repo
uses: actions/checkout@v4
with:
repository: jayces-lang/jayces-lang.github.io
path: jayces-lang.github.io
token: ${{ secrets.PAT }}
- name: Build doc artifacts with MkDocs
run: mkdocs build --site-dir ./jayces-lang.github.io
# TODO: Generate better commit message
- name: Publish doc artifacts
if: github.ref == 'refs/heads/master'
run: |
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -F- <<-_UBLT_COMMIT_MSG_
auto: ${{ github.event.head_commit.message }}
SourceCommit: https://github.com/jayces-lang/jayces/commit/${{ github.sha }}
_UBLT_COMMIT_MSG_
git push
working-directory: jayces-lang.github.io