Skip to content

Cleaned up tutorial

Cleaned up tutorial #1

Workflow file for this run

name: Deploy MkDocs to GitHub Pages
on:
push:
branches: ["main"] # Change "main" to your default branch if necessary
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repository
- name: Checkout repository
uses: actions/checkout@v4
# Step 2: Set up Python environment
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
# Step 3: Install your package from the repository
- name: Install package
run: |
export PYTHONPATH='./src'
export PYTHONPATH='./src/segger'
# Step 4: Install MkDocs and dependencies
- name: Install dependencies
run: |
pip install mkdocs mkdocs-material mkdocs-autorefs mkdocstrings[python] mkdocs-jupyter pymdown-extensions termynal mkdocs-minify-plugin
# Step 5: Build the MkDocs site
- name: Build MkDocs site
run: mkdocs build --verbose
# Step 6: Upload the generated site directory as an artifact for GitHub Pages
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './site' # Only upload the generated `site` folder
# Step 7: Deploy to GitHub Pages
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4