Merge branch 'main' of https://github.com/EliHei2/segger_dev into main #2
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 to GitHub Pages | |
on: | |
push: | |
branches: ["main"] | |
workflow_dispatch: | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install package and documentation dependencies | |
run: | | |
pip install -e . | |
- name: Install MkDocs and plugins | |
run: | | |
pip install mkdocs mkdocs-material mkdocs-autorefs mkdocstrings[python] mkdocs-jupyter pymdown-extensions termynal mkdocs-minify-plugin | |
- name: Debug environment | |
run: | | |
python -m pip freeze | |
python -m mkdocs --version | |
- name: Build MkDocs site | |
run: mkdocs build --verbose | |
- name: Deploy to GitHub Pages | |
run: | | |
git config --global user.name "GitHub Actions" | |
git config --global user.email "[email protected]" | |
mkdocs gh-deploy --force --remote-name origin | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |