Merge branch 'main' of https://github.com/PSModule/docs #73
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: Publish Docs | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - docs/** | |
| - mkdocs.yml | |
| - .github/workflows/Docs.yml | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| MKDOCS_GIT_COMMITTERS_APIKEY: ${{ github.token }} | |
| defaults: | |
| run: | |
| shell: pwsh | |
| permissions: | |
| pages: write # to deploy to Pages | |
| id-token: write # to verify the deployment originates from an appropriate source | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/configure-pages@v5 | |
| - name: Install mkdocs-material | |
| env: | |
| GH_TOKEN: ${{ secrets.MATERIAL_FOR_MKDOCS_INSIDER_PAT }} | |
| run: | | |
| pip install git+https://$env:GH_TOKEN@github.com/squidfunk/mkdocs-material-insiders.git | |
| - name: Install plugins | |
| run: | | |
| pip install mkdocs-git-authors-plugin | |
| pip install mkdocs-git-revision-date-localized-plugin | |
| pip install mkdocs-git-committers-plugin-2 | |
| pip install mkdocs-rss-plugin | |
| pip install "mkdocs-material[imaging]" | |
| pip install mkdocs-table-reader-plugin | |
| - name: Build mkdocs-material project | |
| run: | | |
| mkdocs build --config-file ./mkdocs.yml --strict --site-dir _site/ | |
| - uses: actions/upload-pages-artifact@v3 | |
| deploy: | |
| needs: build | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |