[Design] - Added author callout to homepage #20
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 to GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| pages: write | |
| id-token: write | |
| # Only one deployment runs at a time; queued runs wait, in-progress ones are not cancelled. | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| deploy_sha: ${{ steps.commit_redirects.outputs.sha }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install jaspr_cli | |
| run: dart pub global activate jaspr_cli | |
| - name: Install dependencies | |
| run: flutter pub get | |
| # Diffs content/ against the last deployed commit (the "deployed" tag) | |
| # to catch moved or removed pages. Renames are folded into | |
| # redirects.json automatically; unredirected deletions fail the build. | |
| - name: Check for broken URLs and update redirects | |
| run: dart run tool/redirects.dart check | |
| - name: Commit updated redirects.json | |
| id: commit_redirects | |
| run: | | |
| if ! git diff --quiet -- redirects.json; then | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add redirects.json | |
| git commit -m "Update redirects.json for moved content [skip ci]" | |
| git push | |
| fi | |
| echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" | |
| - name: Build site | |
| run: jaspr build | |
| - name: Build search index | |
| run: npx --yes pagefind --site build/jaspr | |
| - name: Generate redirect stub pages | |
| run: dart run tool/redirects.dart stubs build/jaspr | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: build/jaspr/ | |
| 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 | |
| # Move the "deployed" tag to the commit that was just published, so | |
| # the next run's redirect check diffs against what's actually live. | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ needs.build.outputs.deploy_sha }} | |
| fetch-depth: 0 | |
| - name: Move deployed tag | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git tag -f deployed ${{ needs.build.outputs.deploy_sha }} | |
| git push origin deployed --force |