Build and deploy gh-pages #330
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 and deploy gh-pages | |
on: | |
workflow_run: | |
workflows: [AllTests] | |
types: [completed] | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20.x | |
- name: Setup llvm-ar | |
run: sudo apt install llvm-dev | |
- name: Install NPM packages | |
run: npm ci | |
- name: Build release | |
run: make release-wcc | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: release | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |