Merge pull request #66 from lightninglabs/docs/sync-runbook-release-step #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 Pages | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| env: | |
| VITE_BASE_PATH: /demo/ | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: pnpm/action-setup@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm build | |
| # Stage the runtime asset set from the wavelength release tagged with the | |
| # pinned RUNTIME_MANIFEST_VERSION. | |
| - name: Fetch runtime assets | |
| run: pnpm --filter web-wallet-demo run wasm:fetch | |
| - run: pnpm --filter @lightninglabs/wavelength-docs run build | |
| - run: pnpm --filter web-wallet-demo run build | |
| # The app requests runtime/<version>/ and the fetch script stages it; | |
| # nothing else ties the two together, so assert the built demo actually | |
| # contains the versioned asset set before publishing. | |
| - name: Verify versioned runtime assets in demo dist | |
| run: | | |
| VERSION="$(node scripts/runtime-version.mjs)" | |
| if [ ! -f "apps/web-wallet-demo/dist/runtime/$VERSION/wavewalletdk.wasm" ]; then | |
| echo "::error::demo dist is missing runtime/$VERSION/wavewalletdk.wasm; the staged asset path and the app's runtimeBaseUrl have drifted." | |
| exit 1 | |
| fi | |
| - name: Assemble site | |
| run: | | |
| mkdir -p deploy/demo | |
| # Use the dot-form (dist/.) rather than a glob (dist/*): bash globs | |
| # skip dot-entries, so a glob here would silently drop | |
| # dist/.well-known/ (the /.well-known/skills/ catalog) from the | |
| # published site. | |
| cp -r apps/docs/dist/. deploy/ | |
| cp -r apps/web-wallet-demo/dist/. deploy/demo/ | |
| touch deploy/.nojekyll | |
| - name: Verify well-known skills catalog in assembled site | |
| run: | | |
| if [ ! -f deploy/.well-known/skills/index.json ]; then | |
| echo "::error::deploy/.well-known/skills/index.json is missing; the assemble step dropped dot paths from apps/docs/dist." | |
| exit 1 | |
| fi | |
| - uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: deploy | |
| - id: deployment | |
| uses: actions/deploy-pages@v4 |