From 7eea64c644ebca0234ebc3570f6694c2347b1e2e Mon Sep 17 00:00:00 2001 From: j1c Date: Sun, 7 Apr 2024 19:15:25 -0400 Subject: [PATCH] Try gh pages --- .github/workflows/build.yml | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c1a56815..b60ac9f6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,13 +1,20 @@ name: m2g Build on: push: - branches-ignore: + branches: - "deploy" - "main" pull_request: workflow_call: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + jobs: - build-reference-documentation: + build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -21,18 +28,22 @@ jobs: pip install -U pip setuptools wheel pip install -r docs/requirements.txt sphinx-build -a docs/ docs/_build/html - - name: Archive documentation version artifact - uses: actions/upload-artifact@v4 - with: - name: dependencies - path: | - dependencies_documentation.txt - name: Archive documentation artifacts uses: actions/upload-artifact@v4 with: name: documentation-site - path: | - docs/_build/html + path: docs/_build/html + + # Deployment job + deploy: + runs-on: ubuntu-latest + steps: + - name: "GitHub Pages action" + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: docs/_build/html + code-format-check: runs-on: ubuntu-latest steps: