Skip to content

Commit

Permalink
ci: fix google cloud action
Browse files Browse the repository at this point in the history
  • Loading branch information
Aetherinox committed May 3, 2024
1 parent 1579956 commit 4e0bff4
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,30 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup GCloud
uses: google-github-actions/setup-gcloud@master
uses: google-github-actions/setup-gcloud@v0.7.0
with:
version: '285.0.0'
service_account_key: ${{ secrets.GCP_SA_KEY }}
export_default_credentials: true

- name: Restore git mtime
run: curl -Ss https://raw.githubusercontent.com/MestreLion/git-tools/f3cc70b73200154d027554714c354f35a08680ed/git-restore-mtime | python3

- name: Sync
run: gsutil -m rsync -r -d -x "^\.|^[a-f\d-]{36}$|^README\.md$" docs gs://plugins.keeweb.info/

- name: Purge CloudFlare cache
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CF_TOKEN: ${{ secrets.CF_TOKEN }}
run: |
curl -sS -X POST "https://api.cloudflare.com/client/v4/zones/dbda8e7e454d23edb08d4bc3b3f6f872/purge_cache" \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
-H "Authorization: Bearer $CF_TOKEN" \
-H "Content-Type: application/json" \
--data '{"purge_everything":true}'

0 comments on commit 4e0bff4

Please sign in to comment.