From 8f57c2d150b33d93ed07c6cc6e5a8ba1ea3ddab8 Mon Sep 17 00:00:00 2001 From: Andrei Jiroh Halili Date: Fri, 19 Jul 2024 00:35:54 +0800 Subject: [PATCH] ci(github-actions): update CI deploys Signed-off-by: Andrei Jiroh Halili --- .github/workflows/wrangler-deploy.yml | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/wrangler-deploy.yml b/.github/workflows/wrangler-deploy.yml index 9ae9f6f..19a1392 100644 --- a/.github/workflows/wrangler-deploy.yml +++ b/.github/workflows/wrangler-deploy.yml @@ -39,17 +39,18 @@ jobs: run: yarn install - name: Deploy to Workers in staging id: deploy - uses: cloudflare/wrangler-action@v3 - with: - apiToken: ${{ steps.dotenvx.outputs.WRANGLER_DEPLOY_TOKEN }} - comand: deploy --env staging - workingDirectory: apps/golinks-v2 + run: | + cd apps/golinks-v2 + yarn deploy:stg + 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: ${{ steps.deploy.outputs.deployment-url }} + url: https://staging.go-next.andreijiroh.xyz runs-on: ubuntu-latest - needs: [paths-filter] + needs: [paths-filter, golinks-next] if: needs.paths-filter.outputs.golinks-next == 'true' steps: - uses: actions/checkout@v4 @@ -63,10 +64,10 @@ jobs: node-version: 20 - name: Install dependencies run: yarn install - - name: Deploy to Workers in staging + - name: Deploy to Workers in production id: deploy - uses: cloudflare/wrangler-action@v3 - with: - apiToken: ${{ steps.dotenvx.outputs.WRANGLER_DEPLOY_TOKEN }} - comand: deploy --env production - workingDirectory: apps/golinks-v2 + run: | + cd apps/golinks-v2 + yarn deploy:prod + env: + CLOUDFLARE_API_TOKEN: ${{ steps.dotenvx.outputs.WRANGLER_DEPLOY_TOKEN }} -- knotmirror 0.0.1