update: 241101 #133
This file contains 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 with GitHub Pages dependencies preinstalled | |
on: | |
push: | |
branches: ["main"] | |
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@v3 | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install yamllint | |
run: pip install yamllint | |
- name: Check MkDocs YAML configuration | |
run: yamllint ./mkdocs.yml | |
continue-on-error: true | |
- name: Install required packages | |
run: pip install mkdocs-material mkdocs-macros-plugin pymdown-extensions mkdocs-material-extensions mkdocs-statistics-plugin neoteroi-mkdocs | |
# run: pip install -r requirements.txt | |
- name: Build site (_site directory name is used for Jekyll compatiblity) | |
run: mkdocs build --config-file ./mkdocs.yml --site-dir ./_site | |
env: | |
CI: true | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
# Deployment job | |
deploy: | |
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 |