From 98d877a33542f7fedd7555f70a0d34b782327e3c Mon Sep 17 00:00:00 2001 From: ekko <152005280+EKKOLearnAI@users.noreply.github.com> Date: Sun, 31 May 2026 10:54:06 +0800 Subject: [PATCH] Sequence website deploy after desktop release (#1176) --- .github/workflows/website-deploy.yml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/website-deploy.yml b/.github/workflows/website-deploy.yml index 18bca45..e1791dd 100644 --- a/.github/workflows/website-deploy.yml +++ b/.github/workflows/website-deploy.yml @@ -13,27 +13,37 @@ on: - tsconfig.website.json - vite.config.website.ts - .github/workflows/website-deploy.yml - release: + workflow_run: + workflows: + - Publish Desktop Artifacts to Release types: - - published + - completed workflow_dispatch: permissions: contents: read concurrency: - group: website-${{ github.event.pull_request.number || github.ref }} + group: website-${{ github.event.pull_request.number || github.event.workflow_run.id || github.ref }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: build: name: Build website + if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' runs-on: ubuntu-latest steps: - name: Checkout repository + if: github.event_name != 'workflow_run' uses: actions/checkout@v4 + - name: Checkout desktop release ref + if: github.event_name == 'workflow_run' + uses: actions/checkout@v4 + with: + ref: ${{ github.event.workflow_run.head_branch || github.event.workflow_run.head_sha }} + - name: Setup Node.js uses: actions/setup-node@v4 with: @@ -51,7 +61,7 @@ jobs: run: npm run build:website - name: Prepare SSH - if: github.event_name == 'release' || github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_run' || github.event_name == 'workflow_dispatch' env: WEBSITE_SSH_KEY: ${{ secrets.WEBSITE_SSH_KEY }} WEBSITE_SSH_KNOWN_HOSTS: ${{ secrets.WEBSITE_SSH_KNOWN_HOSTS }} @@ -66,7 +76,7 @@ jobs: fi - name: Deploy website - if: github.event_name == 'release' || github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_run' || github.event_name == 'workflow_dispatch' env: WEBSITE_SSH_USER: ${{ secrets.WEBSITE_SSH_USER }} WEBSITE_SSH_PORT: ${{ secrets.WEBSITE_SSH_PORT }}