Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]
paths:
- .github/workflows/main.yml

permissions:
contents: read

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: false

jobs:
test:
name: Default branch checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.13'
- name: Install uv
uses: astral-sh/setup-uv@v8.1.0
with:
version: latest
- name: Install dependencies
run: uv pip install -e ".[dev]" --system
- name: Lint
run: make lint
- name: Run tests
run: make test

deploy-docs:
name: Build and deploy documentation
needs: test
runs-on: ubuntu-latest
if: github.repository == 'PolicyEngine/microdf'
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.13'
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: '24'
- name: Install uv
uses: astral-sh/setup-uv@v8.1.0
with:
version: latest
- name: Install Python dependencies
run: uv pip install -e ".[dev]" --system
- name: Install MyST
run: npm install -g mystmd
- name: Build documentation with MyST
working-directory: docs
env:
BASE_URL: /microdf
run: |
myst build --html
touch _build/html/.nojekyll
- name: Check documentation output
run: |
test -s docs/_build/html/index.html
test -f docs/_build/html/.nojekyll
- name: Deploy
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: docs/_build/html
66 changes: 0 additions & 66 deletions .github/workflows/master.yml

This file was deleted.

1 change: 1 addition & 0 deletions changelog.d/default-branch-ci.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Restore tests and lint on pushes to main and build the deployed documentation with MyST instead of the retired Jupyter Book command. Include and validate the `.nojekyll` marker so GitHub Pages can publish the prebuilt site.