If you do not pass any inputs, it by default builds a ReSpec or Bikeshed document (index.html
or index.bs
) and validates the output. It does not deploy the built document anywhere.
# .github/workflows/pr.yml
name: CI
on:
pull_request: {}
jobs:
main:
name: Build and Validate
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: w3c/spec-prod@v1
By default, both hyperlink and markup validators are enabled.
# .github/workflows/pr.yml
name: CI
on:
pull_request: {}
jobs:
main:
name: Build and Validate
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: w3c/spec-prod@v1
with:
VALIDATE_LINKS: false
VALIDATE_MARKUP: true
Specify TOOLCHAIN
if the action cannot figure out the toolchain itself, or if you like to be explicit.
# .github/workflows/pr.yml
name: CI
on:
pull_request: {}
jobs:
main:
name: Build and Validate
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: w3c/spec-prod@v1
with:
TOOLCHAIN: respec # or bikeshed
Deployment is only done on push
events. In this example:
- the document is built and validated as a check in the pull request.
- the document is built and validated, and then deployed to
gh-pages
branch, when a commit is pushed to themain
branch.
# .github/workflows/pr-push.yml
name: CI
on:
pull_request: {}
push:
branches: [main]
jobs:
main:
name: Build, Validate and Deploy
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: w3c/spec-prod@v1
with:
GH_PAGES_BRANCH: gh-pages
Presently, only ReSpec documents are supported. See #12.
# .github/workflows/pr-push.yml
name: CI
on:
pull_request: {}
push:
branches: [main]
jobs:
main:
name: Build, Validate and Deploy
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: w3c/spec-prod@v1
with:
W3C_ECHIDNA_TOKEN: ${{ secrets.ECHIDNA_TOKEN }}
# Replace following with appropriate values. See options.md for details.
W3C_MANIFEST_URL: https://w3c.github.io/REPO/MANIFEST
W3C_WG_DECISION_URL: https://lists.w3.org/Archives/Public/public-group/2014JulSep/1234.html