Merge pull request #53 from Corsinvest/bump-version-9.1.3 #11
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
| # SPDX-FileCopyrightText: Copyright Corsinvest Srl | |
| # SPDX-License-Identifier: GPL-3.0-only | |
| name: Deploy MkDocs Documentation | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - 'doc/markdown/**' | |
| - 'doc/mkdocs/**' | |
| - '.github/workflows/deploy-mkdocs.yml' | |
| workflow_dispatch: | |
| # Allow manual trigger | |
| permissions: | |
| contents: write | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Fetch all history for git info | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Cache pip packages | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Install MkDocs and dependencies | |
| run: | | |
| pip install mkdocs-material | |
| - name: Install PowerShell dependencies | |
| shell: pwsh | |
| run: | | |
| Install-Module -Name platyPS -Force -Scope CurrentUser -SkipPublisherCheck | |
| - name: Generate MkDocs documentation | |
| shell: pwsh | |
| run: | | |
| Import-Module ./Tools.psm1 -Force | |
| Invoke-PveAction -Action 'create-doc-mkdocs' | |
| - name: Copy files for MkDocs (symlinks don't work in CI) | |
| run: | | |
| cp -r doc/markdown doc/mkdocs/docs/ | |
| cp README.md doc/mkdocs/docs/index.md | |
| cp LICENSE doc/mkdocs/docs/LICENSE | |
| - name: Build MkDocs site | |
| run: | | |
| cd doc/mkdocs | |
| mkdocs build --strict | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./doc/_site | |
| publish_branch: gh-pages | |
| user_name: 'github-actions[bot]' | |
| user_email: 'github-actions[bot]@users.noreply.github.com' | |
| commit_message: 'docs: deploy MkDocs documentation' |