Updating Hardware again #59
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 MkDocs to GitHub Pages | |
| on: | |
| push: | |
| branches: [ main ] # change if your default branch is different | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # <-- IMPORTANT for git-revision-date-localized | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install deps | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Show config & tree (debug) | |
| run: | | |
| echo "=== mkdocs.yml ===" | |
| sed -n '1,200p' mkdocs.yml | |
| echo "=== docs/ tree ===" | |
| ls -R docs || true | |
| echo "=== latest commit ===" | |
| git log -1 --pretty=fuller | |
| - name: Build | |
| run: mkdocs build --strict --verbose | |
| - name: Add CNAME (optional) | |
| if: ${{ vars.CUSTOM_DOMAIN != '' }} | |
| run: echo "${{ vars.CUSTOM_DOMAIN }}" > ./site/CNAME | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./site | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - id: deployment | |
| uses: actions/deploy-pages@v4 |