chore(devfile): add that draft devfile to repo for a hile #2
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: Deploybot | |
on: | |
push: | |
branches: [main] | |
jobs: | |
paths-filter: | |
runs-on: ubuntu-latest | |
outputs: | |
golinks-next: ${{ steps.filter.outputs.golinks-next }} | |
personal-api: ${{ steps.filter.outputs.personal-api }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
filters: | | |
golinks-cfw-legacy: | |
- 'apps/golinks-v2-cf/**' | |
personal-api: | |
- 'apps/website-api/**' | |
golinks-next: | |
name: Deploy golinks-next to production | |
environment: | |
name: golinks-next/production | |
url: https://go-next.andreijiroh.dev/api/docs | |
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: | | |
yarn install | |
yarn workspace @andreijiroh-dev/golinks-rewrite prisma generate | |
- name: Deploy to Workers in staging | |
id: deploy | |
run: | | |
yarn workspace @andreijiroh-dev/golinks-rewrite deploy:prod | |
git rev-parse HEAD | yarn workspace @andreijiroh-dev/golinks-rewrite wrangler secret put GIT_DEPLOY_COMMIT --env production | |
env: | |
CLOUDFLARE_API_TOKEN: ${{ steps.dotenvx.outputs.WRANGLER_DEPLOY_TOKEN }} |