Skip to content

Merge pull request #83 from Build5Nines/dev #4

Merge pull request #83 from Build5Nines/dev

Merge pull request #83 from Build5Nines/dev #4

Workflow file for this run

name: Deploy MKDocs Site to Pages
on:
push:
branches:
- main
paths:
- .github/workflows/ghpages-mkdocs.yml
- docs/**
- mkdocs.yml
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all branches and tags, not just the default branch.
# This is needed to ensure that the commit SHA is available for the deployment.
# See
sparse-checkout: |
docs
mkdocs.yml
.github/workflows/ghpages-mkdocs.yml
- name: Setup pages
id: pages
uses: actions/configure-pages@v5
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x' # Use the latest version of Python 3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r ./docs/requirements.txt
- name: Build documentation
# Outputs to the './_site' directory by default
run: |
mkdocs build --site-dir ./_site --config-file ./docs/mkdocs.yml
- name: Upload artifact
# Automatically upload an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v3
with:
path: ./docs/_site
deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4