File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : publish
2+
3+ on :
4+ workflow_dispatch :
5+ # Sent by the publish workflow of publiccodeyml/publiccode.yml on
6+ # every push to main, a draft branch or a release tag.
7+ repository_dispatch :
8+ types : [publish]
9+ # Fallback in case a dispatch gets lost.
10+ schedule :
11+ - cron : " 23 5 * * *"
12+
13+ permissions :
14+ contents : read
15+ pages : write
16+ id-token : write
17+
18+ concurrency :
19+ group : publish
20+ cancel-in-progress : false
21+
22+ jobs :
23+ build :
24+ runs-on : ubuntu-latest
25+ steps :
26+ # The toolchain (poly.py, conf.py, templates) always comes from main,
27+ # the content of each version from its release tag or draft branch.
28+ - uses : actions/checkout@v7
29+ with :
30+ repository : publiccodeyml/publiccode.yml
31+ ref : main
32+ fetch-depth : 0
33+ - uses : astral-sh/setup-uv@v7
34+ with :
35+ version : " 0.12.5"
36+ enable-cache : true
37+
38+ # Release tags come with the checkout, but sphinx-polyversion only
39+ # looks at local branches for the drafts
40+ - name : Create the draft branches
41+ run : |
42+ for ref in $(git for-each-ref --format='%(refname:lstrip=3)' 'refs/remotes/origin/[0-9]*-rc'); do
43+ git branch "$ref" "origin/$ref"
44+ done
45+ git branch --list
46+ git tag --list 'v*'
47+
48+ - run : uv run sphinx-polyversion poly.py build/html -vv
49+
50+ - uses : actions/upload-pages-artifact@v5
51+ with :
52+ path : build/html
53+
54+ deploy :
55+ needs : build
56+ runs-on : ubuntu-latest
57+ environment :
58+ name : github-pages
59+ url : ${{ steps.deployment.outputs.page_url }}
60+ steps :
61+ - id : deployment
62+ uses : actions/deploy-pages@v5
Original file line number Diff line number Diff line change 1+ # publiccodeyml.github.io
2+
3+ The website of the [ publiccode.yml Standard] ( https://github.com/publiccodeyml/publiccode.yml ) ,
4+ served at < https://publiccodeyml.github.io > .
5+
6+ There is nothing to edit here: the content and the Sphinx toolchain live
7+ in the ` publiccode.yml ` repository. The
8+ [ publish workflow] ( .github/workflows/publish.yml ) checks it out, builds
9+ every version line with sphinx-polyversion and deploys the result on
10+ GitHub Pages.
11+
12+ A build runs on each push to ` main ` , to a draft branch or to a release
13+ tag of ` publiccode.yml ` , which sends a ` repository_dispatch ` event here.
14+ A daily scheduled run covers a lost dispatch, and the workflow can also
15+ be started by hand from the Actions tab.
You can’t perform that action at this time.
0 commit comments