Merge pull request #9 from scorpionantimalware/master #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is to deploy to Github pages. | |
# This file is written from https://www.sphinx-doc.org/en/master/tutorial/deploying.html. | |
name: "Sphinx: Render docs" | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ master-ready ] | |
# Make sure jobs cannot overlap (e.g. one from push and one from schedule). | |
concurrency: | |
group: published-ci | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build and deploy to the master-published branch | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: 'master-ready' | |
# Run `make` command for building the HTML site. | |
- name: Build HTML | |
uses: ammaraskar/sphinx-action@master | |
with: | |
docs-folder: . | |
build-command: make html | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: html-docs | |
path: _build/html/ | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
if: github.ref == 'refs/heads/master-ready' | |
with: | |
publish_branch: master-published | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: _build/html |