Deploy to GitHub Pages #56
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: Deploy to GitHub Pages | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: actcore.dev | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: actcore/host-browser | |
| path: host-browser | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| # host-browser fetches its WIT deps with wkg (wit/deps is gitignored, | |
| # pinned by wkg.lock). Install the prebuilt binary — no Rust needed. | |
| - name: Install wkg | |
| run: | | |
| curl -fsSL https://github.com/bytecodealliance/wasm-pkg-tools/releases/download/v0.15.1/wkg-x86_64-unknown-linux-gnu -o "$RUNNER_TEMP/wkg" | |
| chmod +x "$RUNNER_TEMP/wkg" | |
| echo "$RUNNER_TEMP" >> "$GITHUB_PATH" | |
| - name: Build @actcore/host | |
| working-directory: host-browser | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| npm ci | |
| npm run sync-wit | |
| npm run build | |
| - name: Install actcore.dev deps (resolves @actcore/host via file:../host-browser) | |
| working-directory: actcore.dev | |
| run: npm install | |
| - name: Build actcore.dev | |
| working-directory: actcore.dev | |
| run: npm run build | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: actcore.dev/dist/ | |
| 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 |