Skip to content

Commit

Permalink
Create build_docs.yml
Browse files Browse the repository at this point in the history
trying build docs in branch
  • Loading branch information
malcolm-dsider authored Oct 27, 2023
1 parent acfcb1f commit ecca8e0
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: build_docs

on: [push, pull_request, workflow_dispatch]

permissions:
contents: write

jobs:
build_docs:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- name: Install dependencies
run: |
pip install sphinx sphinx_rtd_theme myst_parser
- name: Sphinx build
run: |
cd docs
make clean
make html
cd _build
touch .nojekyll
git init
git add -A
git config --local user.email "[email protected]"
git config --local useer.name "GitHub Action"
git commit -m 'deploy'
- name: Deploy to GitHub Pages, force push to destination branch
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./docs/_build/html
force: true
force_orphan: true

0 comments on commit ecca8e0

Please sign in to comment.