Merge pull request #95 from sampleXbro/changeset-release/master #57
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
| # Publishes `website/dist` to GitHub Pages via Actions. | |
| # | |
| # First-time setup (repo admin): Settings → Pages → Build and deployment → Source → GitHub Actions. | |
| # Until that is saved, actions/configure-pages fails with "Get Pages site failed" / REST 404. | |
| # Do not set configure-pages `enablement: true` without a personal access token: the action | |
| # requires a token other than GITHUB_TOKEN to enable Pages via API. | |
| # | |
| # Live site: https://samplexbro.github.io/agentsmesh/ (see website/astro.config.mjs `site` + `base`). | |
| # | |
| # SEO: set repository variable DEPLOY_SITE_URL to the exact public site URL | |
| # you want indexed, e.g. https://samplexbro.github.io/agentsmesh/ or | |
| # https://docs.agentsmesh.dev/. Custom-domain builds emit CNAME automatically. | |
| # Configure DNS or CDN to 301 the non-canonical hostname (www ↔ apex) to that URL. | |
| name: Deploy Website | |
| on: | |
| push: | |
| branches: [master] | |
| # Note: a `paths:` filter was previously used but GitHub silently skipped | |
| # the workflow on several develop→master merge pushes that did include | |
| # website/** changes. Always running on master push is cheap (~60s build, | |
| # idempotent Pages deploy) and removes a class of "stale docs" bugs. | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: pnpm | |
| cache-dependency-path: website/pnpm-lock.yaml | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Install dependencies | |
| working-directory: website | |
| run: pnpm install --frozen-lockfile | |
| - name: Run website tests | |
| working-directory: website | |
| run: pnpm test | |
| - name: Build website | |
| working-directory: website | |
| env: | |
| DEPLOY_SITE_URL: ${{ vars.DEPLOY_SITE_URL }} | |
| run: pnpm run build | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: website/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 |