|
| 1 | +name: Deploy to GitHub Pages |
| 2 | +# Updates the GitHub pages website with the changes made in the last push. |
| 3 | +# Takes in all markdown files and images of the repository and turns that |
| 4 | +# into HTML to present on the GitHub pages website. Used for documentation. |
| 5 | + |
| 6 | +on: |
| 7 | + workflow_dispatch: |
| 8 | + push: |
| 9 | + branches: [main, master, release, development] |
| 10 | + paths: [".github/workflows/push--deploy-github-pages.yaml", "mkdocs.yml", "docs/**"] |
| 11 | + |
| 12 | +permissions: |
| 13 | + contents: read |
| 14 | + pages: write |
| 15 | + id-token: write |
| 16 | + |
| 17 | +concurrency: |
| 18 | + group: github-pages |
| 19 | + cancel-in-progress: false |
| 20 | + |
| 21 | +jobs: |
| 22 | + |
| 23 | + build: |
| 24 | + name: Build site |
| 25 | + runs-on: ubuntu-latest |
| 26 | + steps: |
| 27 | + - name: Checkout repository |
| 28 | + |
| 29 | + - name: Setup Pages |
| 30 | + |
| 31 | + - name: Set up Python |
| 32 | + uses: actions/setup-python@v4 |
| 33 | + with: { python-version: '3.x' } |
| 34 | + - name: Install pip |
| 35 | + run: python -m pip install --upgrade pip |
| 36 | + - name: Install MkDocs and dependencies |
| 37 | + run: > |
| 38 | + pip install mkdocs==1.6.1 mkdocs-shadcn==0.9.8 Pygments==2.19.2 |
| 39 | + mkdocstrings-python==2.0.1 pymdown-extensions==10.19.1 |
| 40 | + click==8.3.1 ghp-import==2.1.0 jinja2==3.1.6 markdown==3.10 |
| 41 | + markupsafe==3.0.3 mergedeep==1.3.4 mkdocs-get-deps==0.2.0 |
| 42 | + pathspec==0.12.1 pyyaml-env-tag==1.1 pyyaml==6.0.3 bottle==0.13.4 |
| 43 | + watchdog==6.0.0 gitpython==3.1.45 mkdocstrings==1.0.0 griffe==1.15.0 |
| 44 | + mkdocs-autorefs==1.4.3 python-dateutil==2.9.0.post0 gitdb==4.0.12 |
| 45 | + smmap==5.0.2 colorama==0.4.6 platformdirs==4.5.1 six==1.17.0 |
| 46 | + - name: Build site with MkDocs |
| 47 | + run: mkdocs --verbose --color build --site-dir ./_site |
| 48 | + - name: Upload artifact |
| 49 | + |
| 50 | + with: { path: ./_site } |
| 51 | + |
| 52 | + deploy: |
| 53 | + name: Deploy site |
| 54 | + environment: |
| 55 | + name: github-pages |
| 56 | + url: ${{ steps.deployment.outputs.page_url }} |
| 57 | + runs-on: ubuntu-latest |
| 58 | + needs: build |
| 59 | + steps: |
| 60 | + - name: Deploy to GitHub Pages |
| 61 | + id: deployment |
| 62 | + |
0 commit comments