Merge pull request #306 from Shirofune-Security/docs-site #1
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 docs to GitHub Pages | |
| # Build the Material for MkDocs site in website/ and publish it to GitHub Pages. | |
| # | |
| # One-time setup: Settings -> Pages -> "Build and deployment" -> | |
| # Source: "GitHub Actions". After that, every push to main that touches | |
| # website/ (or the changelog) (re)deploys the site automatically. | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "website/**" | |
| - "CHANGELOG.md" | |
| - "CHANGELOG-Japanese.md" | |
| - ".github/workflows/docs.yml" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.x" | |
| cache: pip | |
| - name: Install dependencies | |
| run: pip install -r website/requirements.txt | |
| - name: Sync changelog into docs | |
| run: python website/scripts/sync_changelog.py | |
| - name: Build site (strict) | |
| run: mkdocs build --strict --config-file website/mkdocs.yml | |
| - name: Configure Pages | |
| uses: actions/configure-pages@v6 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v5 | |
| with: | |
| path: website/site | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v5 |