From ecca8e0fbdf452720232be9b3d73d1b003301014 Mon Sep 17 00:00:00 2001 From: Malcolm Ross <93150287+malcolm-dsider@users.noreply.github.com> Date: Fri, 27 Oct 2023 15:17:12 -0500 Subject: [PATCH] Create build_docs.yml trying build docs in branch --- .github/workflows/build_docs.yml | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/build_docs.yml diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml new file mode 100644 index 00000000..14b11e41 --- /dev/null +++ b/.github/workflows/build_docs.yml @@ -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 "malcolmgti@gmail.com" + git config --local useer.name "GitHub Action" + git commit -m 'deploy' + - name: Deploy to GitHub Pages, force push to destination branch + uses: ad-m/github-push-action@v0.5.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_branch: gh-pages + publish_dir: ./docs/_build/html + force: true + force_orphan: true