Skip to content

Commit

Permalink
fix: update release and deploy actions (#739) (#741)
Browse files Browse the repository at this point in the history
  • Loading branch information
vncsna authored Jan 20, 2024
1 parent 4e5f17f commit a19c804
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/cd-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ env:
IMAGE_NAME: ghcr.io/basedosdados/website:staging

jobs:
deploy-development:
deploy-staging:
if: ${{ github.event.workflow_run.conclusion == 'success' }} || ${{ github.event_name == 'workflow_dispatch' }}
name: Deploy (Development)
name: Deploy (Staging)
runs-on: ubuntu-latest
environment:
name: development
name: staging
url: https://staging.basedosdados.org

steps:
- name: Checkout
uses: actions/[email protected]
with:
ref: development
ref: staging

- name: Import Secrets
id: import_secrets
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
name: "ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}"
tag: "staging"
pullPolicy: "Always"
replicas: 2
replicas: 1
resources:
requests:
cpu: 100m
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
name: "ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}"
tag: "production"
pullPolicy: "Always"
replicas: 1
replicas: 2
resources:
requests:
cpu: 100m
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
NEXT_PORT: ${{ vars.NEXT_PORT }}
NEXT_PUBLIC_API_URL: ${{ vars.NEXT_PUBLIC_API_URL }}
NEXT_PUBLIC_SITE_NAME: ${{ vars.NEXT_PUBLIC_SITE_NAME }}
NEXT_PUBLIC_KEY_STRIPE: ${{ secrets.NEXT_PUBLIC_KEY_STRIPE }}
NODE_ENV: ${{ vars.NODE_ENV }}
IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:staging

Expand All @@ -43,3 +44,4 @@ jobs:
tags: ${{ env.IMAGE_NAME }}
build-args: |
NEXT_PUBLIC_API_URL=${{ env.NEXT_PUBLIC_API_URL }}
NEXT_PUBLIC_KEY_STRIPE=${{ env.NEXT_PUBLIC_KEY_STRIPE }}
2 changes: 2 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
NEXT_PORT: ${{ vars.NEXT_PORT }}
NEXT_PUBLIC_API_URL: ${{ vars.NEXT_PUBLIC_API_URL }}
NEXT_PUBLIC_SITE_NAME: ${{ vars.NEXT_PUBLIC_SITE_NAME }}
NEXT_PUBLIC_KEY_STRIPE: ${{ secrets.NEXT_PUBLIC_KEY_STRIPE }}
NODE_ENV: ${{ vars.NODE_ENV }}
IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:production

Expand All @@ -43,3 +44,4 @@ jobs:
tags: ${{ env.IMAGE_NAME }}
build-args: |
NEXT_PUBLIC_API_URL=${{ env.NEXT_PUBLIC_API_URL }}
NEXT_PUBLIC_KEY_STRIPE=${{ env.NEXT_PUBLIC_KEY_STRIPE }}

0 comments on commit a19c804

Please sign in to comment.