Fixes for issues found during publication process (#597) #146
This file contains hidden or 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: GitHub Pages Build & Deploy | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| # Allow this job to clone the repo and create a page deployment | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout git repository | |
| uses: actions/checkout@v4 | |
| - name: Install node | |
| uses: actions/setup-node@v4 | |
| with: | |
| cache: npm | |
| node-version-file: .nvmrc | |
| - name: Install and build | |
| run: | | |
| npm ci | |
| npm run build | |
| - name: spec-generator | |
| run: | | |
| cd dist/client/guidelines | |
| tar cf ../../../guidelines.tar * | |
| cd - | |
| cd dist/client/explainer | |
| tar cf ../../../explainer.tar * | |
| cd - | |
| cd dist/client/requirements | |
| tar cf ../../../requirements.tar * | |
| cd - | |
| curl https://www.w3.org/publications/spec-generator/?type=respec -F file=@guidelines.tar -o dist/client/guidelines/index.html -f --retry 3 | |
| curl https://www.w3.org/publications/spec-generator/?type=respec -F file=@explainer.tar -o dist/client/explainer/index.html -f --retry 3 | |
| curl https://www.w3.org/publications/spec-generator/?type=respec -F file=@requirements.tar -o dist/client/requirements/index.html -f --retry 3 | |
| - name: Build and copy how-tos | |
| run: | | |
| cd how-to | |
| npm ci | |
| npm run build:gh-pages | |
| cp -r _site ../dist/client/how-to | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: dist/client | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |