Delete CNAME #18
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 | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| jobs: | |
| check: | |
| name: Typecheck | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| # Types only; this does not need the wasm artifact. | |
| - run: pnpm check | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| # Required to drop stale Nix store caches after a new one is written. | |
| actions: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: cachix/install-nix-action@v31 | |
| with: | |
| extra_nix_config: | | |
| experimental-features = nix-command flakes | |
| # Persist /nix across runs so a warm job substitutes ghostty-vt-wasm | |
| # instead of paying for the Zig compile. Keyed on flake inputs and the | |
| # pnpm lock (what the derivations hash); site source changes reuse the | |
| # restored store and only rebuild the site. | |
| - uses: nix-community/cache-nix-action@v7 | |
| with: | |
| primary-key: nix-${{ runner.os }}-${{ hashFiles('flake.nix', 'flake.lock', 'pnpm-lock.yaml') }} | |
| restore-prefixes-first-match: nix-${{ runner.os }}- | |
| purge: true | |
| purge-prefixes: nix-${{ runner.os }}- | |
| purge-created: 0 | |
| purge-primary-key: never | |
| # Builds libghostty-vt for wasm32-freestanding from the pinned ghostty | |
| # revision, then the site around it. | |
| - run: nix build .#default | |
| # `result` is a symlink into the read-only nix store; the Pages artifact | |
| # action needs a real, writable directory. | |
| - name: Materialise build output | |
| run: | | |
| mkdir -p dist | |
| cp -rL result/. dist/ | |
| chmod -R u+w dist | |
| - name: Verify the wasm shipped | |
| run: test -s dist/ghostty-vt.wasm | |
| - uses: actions/configure-pages@v5 | |
| - uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: dist | |
| deploy: | |
| name: Deploy to Pages | |
| needs: [check, build] | |
| # Manual runs can select another ref; never deploy one of those by accident. | |
| if: github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - id: deployment | |
| uses: actions/deploy-pages@v4 |