switch to gsutil #9
This file contains hidden or 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: Hugo Deploy | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Setup Hugo | |
| uses: peaceiris/actions-hugo@v3 | |
| with: | |
| hugo-version: '0.152.2' # latest | |
| - name: Build Hugo site | |
| run: hugo build --minify | |
| - name: Authenticate to Google Cloud | |
| uses: google-github-actions/auth@v3 | |
| with: | |
| credentials_json: ${{ secrets.GCP_SA_KEY }} | |
| - name: Setup Cloud SDK | |
| uses: google-github-actions/setup-gcloud@v2 | |
| - name: Upload files to GCS | |
| run: gsutil -m rsync -r -d ./public gs://${{ secrets.GCP_BUCKET }} |