DEV Community

Cover image for Spec Prod: a GitHub Action for validating and deploying W3C specs
Sid Vishnoi
Sid Vishnoi

Posted on

Spec Prod: a GitHub Action for validating and deploying W3C specs

My Workflow

Action name: Spec Prod

tl;dr: I created a GitHub action that simplifies the compilation, validation and deployment of specifications in the W3C ecosystem.

This post is solely for the purpose of submission. Read more about the action and its development in my other blog post: Simplifying W3C standards workflow with a GitHub Action.

Submission Category:

DIY Deployments

Yaml File or Link to Code

GitHub logo w3c / spec-prod

GitHub Action to build ReSpec/Bikeshed specs, validate output and publish to GitHub pages or W3C

Spec Prod | Documentation 📘

This GitHub Action lets you:

  • Build ReSpec and Bikeshed specs.
  • Validate generated document's markup and check for broken hyperlinks.
  • Publish generated spec to GitHub Pages and/or w3.org (using Echidna).

Basic Usage

During a pull request, the action:

  • figures out if you're using ReSpec (index.html) or Bikeshed (index.bs)
  • converts the ReSpec/Bikeshed source document to regular HTML
  • runs broken hyperlink checker, and validate markup using W3C nu validator

Additionally, if a commit is pushed to the "main" branch, the action deploys the built specification to /TR/.

# .github/workflows/auto-publish.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@v4
      - uses: w3c/spec-prod@v2
        with:
          W3C_ECHIDNA_TOKEN: ${{ secrets.ECHIDNA_TOKEN }}
          # Replace following with appropriate value. See options.md for details.
          W3C_WG_DECISION_URL: 
Enter fullscreen mode Exit fullscreen mode

Additional Resources / Info

Projects using this action

Top comments (0)