Skip to content

Merge pull request #58 from jeafreezy/more-docs #25

Merge pull request #58 from jeafreezy/more-docs

Merge pull request #58 from jeafreezy/more-docs #25

Workflow file for this run

name: Publish docs via GitHub Pages
on:
push:
branches:
- main
permissions:
contents: write
pages: write
id-token: write
deployments: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.6.1
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Install dependencies and generate CLI docs
run: |
poetry install --with docs --no-interaction --no-root
poetry run typer nigeria_geodata.cli utils docs --output docs/cli/index.md
- name: Commit and Push CLI Documentation Changes
run: |
git config user.name "github-actions"
git config user.email "[email protected]"
git add docs/cli/index.md
git commit -m "Update CLI documentation" || echo "No changes to commit"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build and deploy MkDocs
run: |
poetry run mkdocs gh-deploy --force
- name: Clean up
run: rm -rf .cache