chore(): commit snapshot for @hackclub Arcade 2024 [timestamp:1721583… #11
This file contains 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: Cloudflare Workers Deployments | |
on: | |
push: | |
branches: [main] | |
jobs: | |
paths-filter: | |
runs-on: ubuntu-latest | |
outputs: | |
golinks-next: ${{ steps.filter.outputs.golinks-next }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
filters: | | |
golinks-next: | |
- 'apps/golinks-v2/**' | |
golinks-next: | |
name: Deploy golinks-next to staging | |
environment: | |
name: golinks-next/staging | |
url: ${{ steps.deploy.outputs.deployment-url }} | |
runs-on: ubuntu-latest | |
needs: [paths-filter] | |
if: needs.paths-filter.outputs.golinks-next == 'true' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: andreijiroh-dev/dotenvx-action@main | |
id: dotenvx | |
with: | |
key: ${{ secrets.DOTENV_PRIVATE_KEY_CI }} | |
path: .env.ci | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Install dependencies and generate Prisma client code | |
run: | | |
cd apps/golinks-v2 | |
yarn install | |
yarn prisma generate | |
- name: Deploy to Workers in staging | |
id: deploy | |
run: | | |
cd apps/golinks-v2 | |
yarn deploy:stg | |
git rev-parse | yarn wrangler secret put GIT_DEPLOY_COMMIT | |
env: | |
CLOUDFLARE_API_TOKEN: ${{ steps.dotenvx.outputs.WRANGLER_DEPLOY_TOKEN }} | |
golinks-next-prod: | |
name: Deploy golinks-next to production | |
environment: | |
name: golinks-next/production | |
url: https://staging.go-next.andreijiroh.xyz | |
runs-on: ubuntu-latest | |
needs: [paths-filter, golinks-next] | |
if: needs.paths-filter.outputs.golinks-next == 'true' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: andreijiroh-dev/dotenvx-action@main | |
id: dotenvx | |
with: | |
key: ${{ secrets.DOTENV_PRIVATE_KEY_CI }} | |
path: .env.ci | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: | | |
yarn install | |
yarn prisma generate | |
- name: Deploy to Workers in production | |
id: deploy | |
run: | | |
cd apps/golinks-v2 | |
yarn deploy:prod | |
git rev-parse | yarn wrangler secret put GIT_DEPLOY_COMMIT | |
env: | |
CLOUDFLARE_API_TOKEN: ${{ steps.dotenvx.outputs.WRANGLER_DEPLOY_TOKEN }} |