diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml new file mode 100644 index 0000000..642f5b0 --- /dev/null +++ b/.github/workflows/build-docs.yml @@ -0,0 +1,36 @@ +name: Build Sphinx documentation and deploy to GitHub Pages + +# Controls when the workflow will run +on: + # Triggers the workflow on push events but only for the "main" branch + push: + branches: [ "main" ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Cancel any in-progress job or run +# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + +jobs: + # This workflow contains a single job called "build" + build: + runs-on: ubuntu-latest + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + permissions: + pages: write + id-token: write + + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v4 + + - id: deployment + uses: sphinx-notes/pages@v3