Repository navigation
chore: remove auto-generated timestamp from publication files #139
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
| # Workflow for building and deploying Next.js full-stack site to Cloudflare Workers | |
| name: Deploy Next.js site to Cloudflare Workers | |
| on: | |
| # Runs on pushes targeting the default branch | |
| push: | |
| branches: ["main"] | |
| paths-ignore: | |
| # If there are changes to these files, wait for the update workflows to finish | |
| - "scripts/crawl-publications.ts" | |
| - ".github/workflows/update-publications.yml" | |
| - "scripts/crawl-team.ts" | |
| - ".github/workflows/update-team-photos.yml" | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| # Run after update workflows | |
| workflow_run: | |
| workflows: ["Update Publications", "Update Team Photos"] | |
| types: | |
| - completed | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: "production-worker" | |
| cancel-in-progress: false | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v6 | |
| - name: Setup Node | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: "22" | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Cache optimized images | |
| uses: actions/cache@v6 | |
| with: | |
| path: | | |
| public/optimized | |
| src/data/generated-posts.json | |
| key: ${{ runner.os }}-images-${{ hashFiles('public/team/**', 'public/uploads/**', 'content/**', 'scripts/optimize-all-images.ts') }} | |
| restore-keys: | | |
| ${{ runner.os }}-images- | |
| - name: Lint | |
| run: pnpm lint | |
| - name: Build and deploy to Cloudflare Workers | |
| env: | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_WORKERS_API_TOKEN || secrets.CLOUDFLARE_API_TOKEN }} | |
| NEXT_PUBLIC_KEYSTATIC_STORAGE_KIND: ${{ vars.NEXT_PUBLIC_KEYSTATIC_STORAGE_KIND }} | |
| KEYSTATIC_GITHUB_CLIENT_ID: ${{ secrets.KEYSTATIC_GITHUB_CLIENT_ID }} | |
| KEYSTATIC_GITHUB_CLIENT_SECRET: ${{ secrets.KEYSTATIC_GITHUB_CLIENT_SECRET }} | |
| KEYSTATIC_SECRET: ${{ secrets.KEYSTATIC_SECRET }} | |
| NEXT_PUBLIC_KEYSTATIC_GITHUB_APP_SLUG: ${{ vars.NEXT_PUBLIC_KEYSTATIC_GITHUB_APP_SLUG }} | |
| run: pnpm deploy:worker |