Merge pull request #131 from swapsicledex/main #48
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: Sync Folder to GCS Bucket | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: # Allow the action to be triggered manually | |
jobs: | |
sync: | |
name: Sync Files to GCS | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: Check out the repository | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
# Step 2: Authenticate to Google Cloud | |
- id: 'auth' | |
name: Authenticate to Google Cloud | |
uses: 'google-github-actions/auth@v2' | |
with: | |
credentials_json: '${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}' | |
# Step 3: Set up Google Cloud SDK | |
- name: Set up Cloud SDK | |
uses: 'google-github-actions/setup-gcloud@v2' | |
# Step 4: Sync Folder to GCS Bucket | |
- name: Sync Folder to GCS Bucket | |
run: | | |
gsutil rsync -r ./img gs://trailblazer-cdn/adapters |