Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/bot-autoassign-stale-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ concurrency:
cancel-in-progress: false
jobs:
manage-stale-prs-python:
if: github.repository == 'openwisp/OpenWISP-Website'
uses: openwisp/openwisp-utils/.github/workflows/reusable-bot-autoassign.yml@master
with:
bot_command: stale_pr
Expand Down
30 changes: 23 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,41 +46,57 @@ jobs:
- name: Build
run: make publish

- name: Upload build output
uses: actions/upload-artifact@v4
Comment thread
coderabbitai[bot] marked this conversation as resolved.
with:
name: site-output
path: output/

deploy:
if: >
github.repository == 'openwisp/OpenWISP-Website' &&
github.event_name == 'push'
runs-on: ubuntu-24.04
Comment thread
coderabbitai[bot] marked this conversation as resolved.
needs: build
steps:
- name: Download build output
uses: actions/download-artifact@v4
with:
name: site-output
path: output/

- name: Setup Google Cloud
if: ${{ github.event_name=='push' }}
uses: "google-github-actions/auth@v3"
with:
credentials_json: ${{ secrets.GCS_DOWNLOADS_SERVICE_ACCOUNT_JSON }}
project_id: ${{ secrets.GCS_PROJECT_ID }}
export_environment_variables: true

- name: Set up Cloud SDK
if: ${{ github.event_name=='push' }}
uses: "google-github-actions/setup-gcloud@v3"

- name: Deploy pages to openwisp.org
if: ${{ github.event_name=='push' }}
run: gsutil -m rsync -r ${{ env.SRC_URL }} ${{ env.DST_URL }}
env:
SRC_URL: /home/runner/work/OpenWISP-Website/OpenWISP-Website/output/
DST_URL: gs://${{ secrets.GCS_WEBSITE_BUCKET_NAME }}/

invalidate-cache:
runs-on: ubuntu-latest
needs: build
if: ${{ needs.build.result == 'success' }} && ${{ github.event_name=='push' }}
if: >
github.repository == 'openwisp/OpenWISP-Website' &&
github.event_name == 'push'
needs: deploy

steps:
- name: Authenticate to Google Cloud
if: ${{ github.event_name=='push' }}
uses: google-github-actions/auth@v3
with:
credentials_json: ${{ secrets.GCS_DOWNLOADS_SERVICE_ACCOUNT_JSON }}
project_id: ${{ secrets.GCS_PROJECT_ID }}
export_environment_variables: true

- name: Invalid CDN cache on GCP
if: ${{ github.event_name=='push' }}
uses: stefanodotit/github-actions-invalidate-gcp-cdn@v1
with:
load_balancer_name: ${{ secrets.GCS_MAIN_LOAD_BALANCER_NAME }}
Expand Down
Loading