Skip to content

Commit

Permalink
try without backup
Browse files Browse the repository at this point in the history
  • Loading branch information
gregfrasco committed Aug 23, 2024
1 parent 25d88b7 commit db8144e
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,28 +52,10 @@ jobs:
- name: Build
run: npm run build

- name: Backup existing bucket contents
env:
GOOGLE_APPLICATION_CREDENTIALS: ${{ steps.auth.outputs.credentials_file_path }}
run: |
gsutil mv gs://intact-frontend/** gs://intact-frontend/backup/
echo "backup_done=true" >> $GITHUB_ENV
- name: Deploy to Google Cloud Bucket
uses: google-github-actions/upload-cloud-storage@v2
#if: success() && github.ref == 'refs/heads/main' && env.backup_done == 'true'
with:
path: /dist/
destination: intact-frontend
parent: false

- name: Remove backup
#if: success() && github.ref == 'refs/heads/main' && env.backup_done == 'true'
run: |
gsutil rm -r gs://intact-frontend/backup/
- name: Restore from backup (on failure)
#if: failure() && github.ref == 'refs/heads/main' && env.backup_done == 'true'
run: |
gsutil mv gs://intact-frontend-backup/** gs://intact-frontend/
gsutil -m rm -r gs://intact-frontend-backup/
parent: false

0 comments on commit db8144e

Please sign in to comment.