chore: added a deploy to github pages workflow #13
This file contains hidden or 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
| name: Deploy to GitHub Pages | |
| # Updates the GitHub pages website with the changes made in the last push. | |
| # Takes in all markdown files and images of the repository and turns that | |
| # into HTML to present on the GitHub pages website. Used for documentation. | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [main, master, release, development] | |
| paths: [".github/workflows/push--deploy-github-pages.yaml", "mkdocs.yml", "docs/**"] | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: github-pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| name: Build site | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6.0.1 | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5.0.0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: { python-version: '3.x' } | |
| - name: Install pip | |
| run: python -m pip install --upgrade pip | |
| - name: Install MkDocs and dependencies | |
| run: pip install mkdocs mkdocs-shadcn mkdocstrings-python pymdown-extensions | |
| - name: Build site with MkDocs | |
| run: mkdocs --verbose --color build --site-dir ./_site | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v4.0.0 | |
| with: { path: ./_site } | |
| deploy: | |
| name: Deploy site | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4.0.5 |