forked from X2CommunityCore/X2WOTCCommunityHighlander
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (40 loc) · 1.14 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
name: docs
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Checkout
uses: actions/checkout@v1
- name: Build Docs
run: |
python ./.scripts/make_docs.py ./X2WOTCCommunityHighlander/Src/ ./X2WOTCCommunityHighlander/Config/ --outdir ./mkdocs --docsdir ./docs_src
pip install mkdocs
cd mkdocs
mkdocs build -d ../target
- name: Upload the built docs
uses: actions/upload-artifact@v1
with:
name: docs-html
path: target
deploy:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- name: Get the built docs
uses: actions/download-artifact@v1
with:
name: docs-html
path: target
- name: Deploy
uses: crazy-max/ghaction-github-pages@v1
with:
target_branch: gh-pages
build_dir: target # The folder the action should deploy.
committer_name: X2CommunityCore-Docs-Bot
env:
GITHUB_PAT: ${{ secrets.ACCESS_TOKEN }}