Landing Pages #7
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: Landing Pages | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'landing/**' | |
| - '.github/workflows/landing-pages.yml' | |
| # NOT `release: types: [published]` — release.yml publishes via the default | |
| # GITHUB_TOKEN, and GitHub does not dispatch events from the default token | |
| # to other workflows (recursive-trigger prevention). That release event | |
| # would never actually fire this workflow. workflow_run isn't subject to | |
| # that restriction since it's driven by run completion, not a token-authored | |
| # API event. | |
| workflow_run: | |
| workflows: ['Release'] | |
| types: [completed] | |
| workflow_dispatch: | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true' | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Configure Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: .tool-versions | |
| cache: npm | |
| cache-dependency-path: landing/package-lock.json | |
| - name: Install landing dependencies | |
| working-directory: landing | |
| run: npm ci | |
| - name: Build landing site | |
| working-directory: landing | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SITE_URL: https://audist.app | |
| run: npm run build | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: landing/dist | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |