name: Website on: push: branches: [main] paths: ["site/**", "tools/marketing/**", ".github/workflows/pages.yml"] # The Release and Desktop workflows start this after uploading their files, so the site moves # to a release once it is complete. A release created with GITHUB_TOKEN doesn't trigger # workflows, so "on: release" would never run. workflow_dispatch: permissions: contents: read pages: write id-token: write concurrency: group: pages cancel-in-progress: true jobs: # Build and deploy are separate jobs, as in GitHub's own Pages template: with both in one job, # deploy-pages sometimes couldn't find the artifact the step before it had just uploaded. build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 22 # Links, version labels and dates follow the newest release that has all its files (APKs, # SHA256SUMS, desktop archives), so the site never links to files that don't exist yet. Only the uploaded copy changes; nothing is committed. - name: Point the site at the newest published release env: GH_TOKEN: ${{ github.token }} run: | gh api "repos/$GITHUB_REPOSITORY/releases?per_page=30" > "$RUNNER_TEMP/releases.json" node tools/release-docs.mjs --releases "$RUNNER_TEMP/releases.json" --any - name: Validate website content and links run: node tools/marketing/check-site.mjs - uses: actions/configure-pages@v6 - uses: actions/upload-pages-artifact@v5 with: path: site deploy: needs: build runs-on: ubuntu-latest environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} steps: - id: deployment uses: actions/deploy-pages@v5