From 78d7ac02eec0210192df5595a730bb16d591c6ba Mon Sep 17 00:00:00 2001 From: Alexandre Vincent Date: Fri, 19 Jun 2026 16:22:37 +0200 Subject: [PATCH 1/3] [ci] Only run manage-stale-prs-python on openwisp/OpenWISP-Website repo --- .github/workflows/bot-autoassign-stale-pr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/bot-autoassign-stale-pr.yml b/.github/workflows/bot-autoassign-stale-pr.yml index 80e42048..08861b61 100644 --- a/.github/workflows/bot-autoassign-stale-pr.yml +++ b/.github/workflows/bot-autoassign-stale-pr.yml @@ -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 From 0faf810a85a49156e1a2101c4d890de0aa26d499 Mon Sep 17 00:00:00 2001 From: Alexandre Vincent Date: Fri, 19 Jun 2026 16:34:54 +0200 Subject: [PATCH 2/3] [ci] Add deploy step to run only on push to openwisp/OpenWISP-Website --- .github/workflows/ci.yml | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ba12fd2d..2f916cf8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,8 +46,24 @@ jobs: - name: Build run: make publish + - name: Upload build output + uses: actions/upload-artifact@v4 + with: + name: site-output + path: output/ + + deploy: + if: github.repository == 'openwisp/OpenWISP-Website' && github.event_name == 'push' + runs-on: ubuntu-24.04 + 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 }} @@ -55,11 +71,9 @@ jobs: 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/ @@ -67,12 +81,11 @@ jobs: 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 }} @@ -80,7 +93,6 @@ jobs: 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 }} From d548ee415e091300a952e2a49e3ca6450d26dc21 Mon Sep 17 00:00:00 2001 From: Federico Capoano Date: Thu, 9 Jul 2026 19:42:18 -0300 Subject: [PATCH 3/3] [chores] Readability --- .github/workflows/ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b0524ae..b572ca56 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,7 +53,9 @@ jobs: path: output/ deploy: - if: github.repository == 'openwisp/OpenWISP-Website' && github.event_name == 'push' + if: > + github.repository == 'openwisp/OpenWISP-Website' && + github.event_name == 'push' runs-on: ubuntu-24.04 needs: build steps: @@ -81,7 +83,9 @@ jobs: invalidate-cache: runs-on: ubuntu-latest - if: github.repository == 'openwisp/OpenWISP-Website' && github.event_name == 'push' + if: > + github.repository == 'openwisp/OpenWISP-Website' && + github.event_name == 'push' needs: deploy steps: