Skip to content

Workflow file for this run

# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
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:
# Step 1: Checkout the repository
- name: Checkout Code
uses: actions/checkout@v3
with:
submodules: true # Checkout submodules
token: ${{ secrets.SUBMODULES_TOKEN }} # Use the GitHub token for authentication
fetch-depth: 0 # Ensure the full history is fetched (necessary for some workflows)
# Step 2: Set up Python environment
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: '3.12' # Replace with the specific version if needed
# Step 2: Setup any necessary dependencies (optional, depends on your project)
# You can add more setup steps here if required for your build
# Step 3: Run make for building the project
- name: Build Project
run: |
python -m pip install poetry
poetry install --directory make_scripts/mkdocs-documentation/
make doc-build
- name: ls dir
run: ls
# Step 4: Upload build artifacts
# This step makes sure the built files are available in the deploy step
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: site
path: ./site # Change this path to wherever your build output is located
# Single deploy job since we're just deploying
deploy:
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: site
- name: Setup Pages
uses: actions/configure-pages@v5
- name: ls dir
run: ls
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'site'
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.SUBMODULES_TOKEN }}
publish_dir: ./site # Directory with the build artifacts