Skip to content

deps(deps-dev): bump typescript-eslint in the lint-and-format group (… #165

deps(deps-dev): bump typescript-eslint in the lint-and-format group (…

deps(deps-dev): bump typescript-eslint in the lint-and-format group (… #165

Workflow file for this run

name: Deploy Documentation
on:
push:
branches: ['main']
release:
types: [published, released]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
deploy-docs:
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
id-token: write
steps:
- name: Debug release event
if: github.event_name == 'release'
run: |
echo "Release event detected!"
echo "Event name: ${{ github.event_name }}"
echo "Event action: ${{ github.event.action }}"
echo "Release tag: ${{ github.event.release.tag_name }}"
echo "Release name: ${{ github.event.release.name }}"
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 0 # Fetch full history for mike versioning
- name: Copy env file
run: cp .env.example .env
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Install Node.js
uses: actions/setup-node@v5
with:
node-version: 22
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Run linter
run: pnpm run lint
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Install Python dependencies
run: pip install -r requirements.txt
- name: Configure git for mike
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Build and deploy main branch docs
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: |
pnpm run doc:generate
pnpm run compodoc
mike deploy --push --update-aliases main
mike set-default --push main
- name: Build and deploy release docs
if: github.event_name == 'release' && (github.event.action ==
'published' || github.event.action == 'released')
run: |
pnpm run doc:generate
pnpm run compodoc
# Deploy to latest and set as default
mike deploy --push --update-aliases latest
mike set-default --push latest
- name: Manual deployment
if: github.event_name == 'workflow_dispatch'
run: |
pnpm run doc:generate
pnpm run compodoc
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
mike deploy --push --update-aliases main
mike set-default --push main
else
# For manual deployment from other branches, use branch name
BRANCH_NAME=${GITHUB_REF#refs/heads/}
mike deploy --push $BRANCH_NAME
fi