Skip to content

Commit

Permalink
using lffs's documentation.yml file
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianOBlanton committed Oct 31, 2023
1 parent 8dcb357 commit d9fbacb
Showing 1 changed file with 31 additions and 21 deletions.
52 changes: 31 additions & 21 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,37 @@
name: documentation
name: Documentation
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ammaraskar/sphinx-action@master
with:
pre-build-command: "pip3 install sphinx-rtd-theme"
docs-folder: "doc/"
- uses: actions/upload-pages-artifact@v1
with:
path: doc/build/html/
deploy:
# Add a dependency to the build job
needs: build

on: [push, pull_request, workflow_dispatch]
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

permissions:
contents: write
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

jobs:
docs:
# Specify runner + deployment step
runs-on: ubuntu-latest
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: |
sphinx-build doc _build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true
id: deployment
uses: actions/deploy-pages@v1

0 comments on commit d9fbacb

Please sign in to comment.