-
Notifications
You must be signed in to change notification settings - Fork 10
64 lines (62 loc) · 1.48 KB
/
build_gh-pages.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
63
64
name: Deploy Sphinx documentation to Pages
on: [ push ] # branch to trigger deployment
jobs:
pages:
runs-on: ubuntu-20.04
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
- id: deployment
uses: sphinx-notes/pages@v3
## https://stackoverflow.com/questions/62683329/how-to-self-host-read-the-docs-using-github-pages
#name: docs_pages_workflow
#
#on: [ push ]
#
#jobs:
#
# build_docs_job:
# runs-on: ubuntu-latest
# env:
# GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
#
# steps:
# - name: Checkout
# uses: actions/checkout@v2.3.4
#
# - name: Set up Python
# uses: actions/setup-python@v2.2.1
# with:
# python-version: 3.9
#
# - name: Install dependencies
# run: |
# python -m pip install -U sphinx
# python -m pip install sphinx-rtd-theme
#
# - name: make the sphinx docs
# run: |
# make -C docs clean
# make -C docs html
#
# - name: Init new repo in dist folder and commit
# run: |
# cd docs/_build/html/
# git init
# touch .nojekyll
# git add -A
# git config --local user.email "action@github.com"
# git config --local user.name "GitHub Action"
# git commit -m 'deploy'
#
# - name: Force push to destination branch
# uses: ad-m/github-push-action@v0.5.0
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# branch: gh-pages
# force: true
# directory: ./docs/_build/html