Merge pull request #566 from 1EdTech/feature/vcdm-20 #13
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: Build Examples | |
on: | |
# Triggers the workflow on push or pull request events but only for the develop branch | |
push: | |
branches: | |
- develop | |
paths: | |
- 'ob_v3p0/examples.html' | |
- '.github/workflows/examples_push.yml' | |
jobs: | |
sideload: | |
name: Sideload the ob_v3p0.lines file | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- run: curl -H 'X-Api-Key:${{ secrets.API_KEY }}' -F 'file=@ob_v3p0/ob_v3p0.lines' https://datamodels-staging.imsglobal.org/upload | |
continue-on-error: false | |
build: | |
name: Build a static version of the Respec document | |
needs: sideload | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Unlock secrets | |
uses: sliteteam/[email protected] | |
env: | |
GIT_CRYPT_KEY: ${{ secrets.GIT_CRYPT_KEY }} | |
# This will run the respec2html tool | |
- uses: w3c/spec-prod@v2 | |
with: | |
SOURCE: "ob_v3p0/examples.html" | |
DESTINATION: "docs/examples.html" | |
TOOLCHAIN: respec | |
VALIDATE_MARKUP: false | |
VALIDATE_WEBIDL: false | |
VALIDATE_LINKS: false | |
BUILD_FAIL_ON: nothing | |
publish: | |
name: Publish to GH pages | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: gh-pages | |
- name: Download artifact created by build job | |
uses: actions/download-artifact@v2 | |
with: | |
name: spec-prod-result | |
path: docs | |
- name: Commit the new/updated doc | |
run: | | |
git pull | |
git add docs/* | |
git config --local user.name "GitHub Actions" | |
git config --local user.email "[email protected]" | |
git commit --allow-empty -m "Automated build" | |
git push origin |