reformat some prose #12
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 Site | |
# Run on push to main branch, on a schedule, and allow manual trigger | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: # Allows manual trigger from the GitHub Actions tab | |
jobs: | |
deploy-mkdocs: | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write # Grants permissions to write to the GitHub Pages | |
id-token: write # Necessary for authentication | |
steps: | |
# Step 1: Check out the repository | |
- uses: actions/checkout@v3 | |
# Step 2: Set up Python | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
# Step 3: Install Poetry (if using Poetry for dependency management) | |
- name: Install Poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python3 - | |
# Step 4: Install MkDocs dependencies | |
- name: Install dependencies | |
run: | | |
poetry install # Make sure mkdocs and plugins are in your pyproject.toml dependencies | |
# Step 5: Build the MkDocs site | |
- name: Build the MkDocs site | |
run: | | |
poetry run mkdocs build --site-dir _site | |
# Step 6: Upload the site files as an artifact | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: "_site" # Path where MkDocs built the HTML files | |
# Step 7: Deploy the site to GitHub Pages | |
- name: Deploy to GitHub Pages | |
uses: actions/deploy-pages@v4 |