Skip to content

fix: ap sync by avoiding duplicate comments in myst.yml and update py… #12

fix: ap sync by avoiding duplicate comments in myst.yml and update py…

fix: ap sync by avoiding duplicate comments in myst.yml and update py… #12

Workflow file for this run

name: Deploy Project Website to GitHub Pages
on:
push:
branches:
- main # Deploy when pushing to main branch
paths:
# Trigger deployment only when content or website files change
- 'afterpython/doc/**'
- 'afterpython/blog/**'
- 'afterpython/tutorial/**'
- 'afterpython/example/**'
- 'afterpython/guide/**'
- 'afterpython/static/**'
- 'afterpython/_website/**'
- 'afterpython/authors.yml'
- 'afterpython/faq.yml'
- '.github/workflows/deploy.yml'
workflow_dispatch: # Allow manual deployment from Actions tab
# 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@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
cache: 'pnpm'
cache-dependency-path: './afterpython/_website/pnpm-lock.yaml'
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "latest"
- name: Install afterpython
run: uv pip install --system afterpython
- name: Install website dependencies
run: pnpm install
working-directory: ./afterpython/_website
- name: Build website
run: |
ap build
env:
BASE_PATH: '/${{ github.event.repository.name }}'
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './afterpython/_website/build'
deploy:
environment:
name: github-pages
# This will dynamically generate the deployment URL
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4