Bump version of Ubuntu and actions #154
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Workflow based on the main w3c/spec-prod action example: | |
# https://github.com/w3c/spec-prod/#basic-usage | |
# | |
# Custom code added to generate the CDDL messages appendix for inclusion in the | |
# generated specification file. | |
name: Build, Validate, and Deploy | |
on: | |
# Worflow runs on pull requests where it makes sure that the spec can still be | |
# generated, that markup is valid and that there are no broken links, as | |
# well as on pushes to the default branch where it also deploys the generated | |
# spec to the gh-pages branch. The "workflow_dispatch" hook allows admins to | |
# also trigger the workflow manually from GitHub's UI. | |
pull_request: {} | |
push: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
# See doc at https://github.com/actions/checkout/ | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
# See doc at https://github.com/actions/setup-python/ | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install Pygments | |
# Note: the step actually generates all CDDL message pages, but the | |
# w3c/spec-prod action cleans these files after each build, so we'll | |
# have to generate them again each time. | |
- name: Generate messages_appendix.html | |
run: python scripts/pygmentize_dir.py | |
# See doc at https://github.com/w3c/spec-prod/#spec-prod | |
# The action only deploys the generated spec to the gh-pages branch when | |
# the workflow was triggered by a push to the default branch. | |
- name: Build and validate index.html, push to gh-pages branch if needed | |
uses: w3c/spec-prod@v2 | |
with: | |
GH_PAGES_BRANCH: gh-pages | |
W3C_ECHIDNA_TOKEN: ${{ secrets.ECHIDNA_TOKEN }} | |
W3C_WG_DECISION_URL: https://lists.w3.org/Archives/Public/public-secondscreen/2022Apr/0007.html | |
W3C_BUILD_OVERRIDE: | | |
status: WD | |
- name: Generate application_messages.html | |
run: python scripts/pygmentize_dir.py | |
- name: Build and validate application.html, push to gh-pages branch if needed | |
uses: w3c/spec-prod@v2 | |
with: | |
SOURCE: application.bs | |
TOOLCHAIN: bikeshed | |
GH_PAGES_BRANCH: gh-pages | |
W3C_ECHIDNA_TOKEN: ${{ secrets.ECHIDNA_TOKEN_APPLICATION }} | |
- name: Generate network_messages.html | |
run: python scripts/pygmentize_dir.py | |
- name: Build and validate network.html, push to gh-pages branch if needed | |
uses: w3c/spec-prod@v2 | |
with: | |
SOURCE: network.bs | |
TOOLCHAIN: bikeshed | |
GH_PAGES_BRANCH: gh-pages | |
W3C_ECHIDNA_TOKEN: ${{ secrets.ECHIDNA_TOKEN_NETWORK }} |