Skip to content

Commit

Permalink
[ci] Updated Google Cloud steps
Browse files Browse the repository at this point in the history
  • Loading branch information
nemesifier committed Jul 3, 2024
1 parent 4aacccf commit 0f518b5
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,22 @@ jobs:
- name: QA checks
run: ./run-qa-checks

- name: Setup Google Cloud
- name: Google Cloud Auth
if: ${{ github.event_name=='push' }}
uses: google-github-actions/setup-gcloud@v0
uses: 'google-github-actions/auth@v2'
with:
project_id: ${{ secrets.GCS_PROJECT_ID }}
credentials_json: ${{ secrets.GCS_DOWNLOADS_SERVICE_ACCOUNT_JSON }}

- name: Google Cloud Setup
if: ${{ github.event_name=='push' }}
uses: google-github-actions/setup-gcloud@v2
with:
service_account_key: ${{ secrets.GCS_DOWNLOADS_SERVICE_ACCOUNT_JSON }}
project_id: ${{ secrets.GCS_PROJECT_ID }}
export_default_credentials: true

- name: Deploy pages to openwisp.io/docs
if: ${{ github.event_name=='push' }}
run: gsutil -m rsync -r ${{ env.SRC_URL }}/_build/html/ ${{ env.DST_URL }}
run: gsutil -D -m rsync -r ${{ env.SRC }} ${{ env.DEST }}
env:
SRC_URL: /home/runner/work/openwisp2-docs/openwisp2-docs
DST_URL: gs://${{ secrets.GCS_DOCS_BUCKET_NAME }}/docs
SRC: /home/runner/work/openwisp-docs/openwisp-docs/_build/html
DEST: gs://${{ secrets.GCS_DOCS_BUCKET_NAME }}/docs

0 comments on commit 0f518b5

Please sign in to comment.