Skip to content

Commit cf1caae

Browse files
authored
fix: restore the CI workflow and gitignore lost in the first push (#1)
The initial commit landed without any dotfile-prefixed paths, so the repository has no CI at all: pushes to main neither build the site nor deploy it, and pull requests run no checks. Restores the deploy workflow, the dependabot config and the gitignore. Untracks the two .pyc files that were committed as a side effect of the missing gitignore.
1 parent ad7973a commit cf1caae

5 files changed

Lines changed: 111 additions & 0 deletions

File tree

‎.github/dependabot.yml‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: github-actions
9+
directory: /
10+
schedule:
11+
interval: "weekly"
12+
groups:
13+
actions:
14+
patterns:
15+
- "*"

‎.github/workflows/deploy.yml‎

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Deploy site
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
# The reference pages describe behaviour that lives in the commit-check
15+
# repository, so they can drift without anything here changing. This job
16+
# reads both and fails when they disagree.
17+
docs-sync:
18+
runs-on: ubuntu-24.04
19+
steps:
20+
- uses: actions/checkout@v7
21+
with:
22+
persist-credentials: false
23+
24+
- uses: actions/setup-python@v7
25+
with:
26+
python-version: '3.x'
27+
28+
# Installed from main rather than PyPI: the site documents rule IDs that
29+
# are merged but not yet released, so the published package would report
30+
# a spurious mismatch. Switch this to the released package once a version
31+
# carrying them is on PyPI.
32+
- name: Install commit-check from main
33+
run: |
34+
python -m pip install --upgrade pip
35+
python -m pip install pytest
36+
python -m pip install "commit-check @ git+https://github.com/commit-check/commit-check@main"
37+
38+
- name: Check the docs against the package
39+
run: pytest tests/ -q
40+
41+
build:
42+
runs-on: ubuntu-24.04
43+
steps:
44+
- uses: actions/checkout@v7
45+
with:
46+
persist-credentials: false
47+
48+
- uses: actions/setup-python@v7
49+
with:
50+
python-version: '3.x'
51+
52+
# The social plugin renders the share cards through cairo, which cairosvg
53+
# loads at runtime rather than bundling.
54+
- name: Install cairo
55+
run: sudo apt-get install -y --no-install-recommends libcairo2
56+
57+
- name: Build site
58+
run: pipx run nox -s docs
59+
60+
- name: Upload site as pages artifact
61+
uses: actions/upload-pages-artifact@v5
62+
with:
63+
name: ${{ github.event.repository.name }}_site
64+
path: ${{ github.workspace }}/site
65+
66+
deploy:
67+
if: github.ref == 'refs/heads/main'
68+
runs-on: ubuntu-24.04
69+
needs: [build]
70+
permissions:
71+
pages: write
72+
id-token: write
73+
environment:
74+
name: github-pages
75+
url: ${{ steps.deployment.outputs.page_url }}
76+
steps:
77+
- name: Deploy to GitHub Pages
78+
id: deployment
79+
uses: actions/deploy-pages@v5
80+
with:
81+
artifact_name: ${{ github.event.repository.name }}_site

‎.gitignore‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Build output
2+
site/
3+
4+
# Social card cache
5+
.cache/
6+
7+
# Python
8+
__pycache__/
9+
*.py[cod]
10+
.nox/
11+
.venv/
12+
13+
# OS
14+
.DS_Store
15+
Thumbs.db
-2.51 KB
Binary file not shown.
-17.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)