Skip to content

Version 3.1.0

Version 3.1.0 #50

Workflow file for this run

name: Documentation
on:
push:
paths:
- docs/**
- mkdocs.yml
- pyproject.toml
- .github/workflows/docs.yml
workflow_dispatch:
jobs:
build:
name: Build Documentation
environment: main
runs-on: ubuntu-latest
steps:
- name: Mask Secrets
run: echo "::add-mask::${{ secrets.FONTAWESOME_PKG_TOKEN }}"
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set Up Python
uses: actions/setup-python@v5
with:
python-version: 3.11.1
- name: Set Up Poetry
run: pipx install poetry==1.8.2
- name: Set Up Cache
uses: actions/cache@v3
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install Dependencies
run: poetry install --only main,docs && poetry run icl install
env:
POETRY_REPOSITORIES_MATERIAL_INSIDERS_URL: https://github.com/squidfunk/mkdocs-material-insiders
POETRY_HTTP_BASIC_MATERIAL_INSIDERS_USERNAME: celsiusnarhwal
POETRY_HTTP_BASIC_MATERIAL_INSIDERS_PASSWORD: ${{ secrets.GH_PAT }}
FONTAWESOME_PKG_TOKEN: ${{ secrets.FONTAWESOME_PKG_TOKEN }}
- name: Build Documentation
run: poetry run mkdocs build
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: site
path: site
deploy:
name: Deploy Documentation
environment: main
needs: build
runs-on: ubuntu-latest
steps:
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: site
path: site
- name: Deploy to Vercel
run: npx vercel --yes --cwd site --token ${{ secrets.VERCEL_TOKEN }} ${{ github.ref_name == 'main' && '--prod' || '' }}
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}