Skip to content

Commit

Permalink
message
Browse files Browse the repository at this point in the history
  • Loading branch information
andromaqui committed Jun 11, 2024
1 parent ab1f5f6 commit 67fe5db
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/preview-env-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
jobs:
deploy-preview:
#if: github.event.pull_request.state != 'closed' && (contains( github.event.label.name, 'deploy') || contains( github.event.pull_request.labels.*.name, 'deploy'))
if: github.event.pull_request.state == 'closed'
runs-on: ubuntu-22.04
timeout-minutes: 40
name: deploy-preview-env
Expand Down Expand Up @@ -32,6 +33,8 @@ jobs:
run: npm run build
env:
NODE_OPTIONS: --max_old_space_size=8192
URL: https://somebucket
BASE_URL: /pr-${{ github.event.number }}

- name: Authenticate with Google Cloud
uses: google-github-actions/auth@v2
Expand All @@ -46,7 +49,7 @@ jobs:
- name: Upload files to google bucket
env:
BUCKET_NAME: ${{ steps.secrets.outputs.TEMP_BUCKET }}
run: |
run: |
gcloud config set pass_credentials_to_gsutil true
gsutil -m cp -R build/* gs://$BUCKET_NAME/pr-${{ github.event.number }}/
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/preview-env-teardown.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
name: preview-env-teardown
on:
pull_request:
types: [labeled, synchronize]

jobs:
deploy-preview:
#if: github.event.pull_request.state != 'closed' && (contains( github.event.label.name, 'deploy') || contains( github.event.pull_request.labels.*.name, 'deploy'))
#if: github.event.label.name == 'deploy' || (github.event.action == 'closed' && contains( github.event.pull_request.labels.*.name, 'deploy') )
runs-on: ubuntu-22.04
timeout-minutes: 20
name: teardown-preview-env
Expand Down Expand Up @@ -39,7 +38,7 @@ jobs:
- name: Remove files from Google bucket
env:
BUCKET_NAME: ${{ steps.secrets.outputs.TEMP_BUCKET }}
run: |
run: |
gcloud config set pass_credentials_to_gsutil true
gsutil -m rm -r gs://$BUCKET_NAME/pr-${{ github.event.number }}/
Expand Down

0 comments on commit 67fe5db

Please sign in to comment.