Editorial: Align with Web IDL specification (#351) #190
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
name: CI | |
on: | |
# Worflow runs on pull requests where it makes sure that the spec can be | |
# generated, that markup and IDL are valid, as well as on pushes to the | |
# default branch where it also deploys the generated spec to the gh-pages | |
# branch and publishes the result to /TR. | |
# The "workflow_dispatch" hook allows repo admins to trigger the workflow | |
# manually if needed. | |
pull_request: {} | |
push: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
main: | |
name: Build, Validate and Deploy | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
# Run spec-prod action to build, validate the spec itself and, | |
# if event is a push, deploy it both to the gh-pages branch and | |
# to w3.org/TR | |
- name: Build, validate and deploy spec | |
uses: w3c/spec-prod@v2 | |
with: | |
TOOLCHAIN: respec | |
SOURCE: media-source-respec.html | |
DESTINATION: index.html | |
GH_PAGES_BRANCH: gh-pages | |
W3C_ECHIDNA_TOKEN: ${{ secrets.ECHIDNA_TOKEN }} | |
W3C_WG_DECISION_URL: https://github.com/w3c/media-wg/issues/27 | |
W3C_BUILD_OVERRIDE: | | |
specStatus: WD | |
# If event is a push to main branch (and not a pull request), | |
# copy static files over to the gh-pages branch, excluding files | |
# that don't need to be published, and preserving older versions | |
# of the spec that are in the gh-pages branch. | |
# Note: Step needs to take place after spec-prod step because the | |
# w3c/spec-prod action expects local state to be clean and the | |
# peaceiris/actions-gh-pages seems to change it in such a way that the | |
# w3c/spec-prod can no longer find the .git/config file. | |
- name: Deploy static files | |
if: ${{ github.ref == 'refs/heads/main' }} | |
uses: peaceiris/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./ | |
exclude_assets: '.github,*.md,*.json,media-source-respec.html' | |
keep_files: true |