Sequence website deploy after desktop release (#1176)

This commit is contained in:
ekko
2026-05-31 10:54:06 +08:00
committed by GitHub
parent a7be7c0175
commit 98d877a335
+15 -5
View File
@@ -13,27 +13,37 @@ on:
- tsconfig.website.json - tsconfig.website.json
- vite.config.website.ts - vite.config.website.ts
- .github/workflows/website-deploy.yml - .github/workflows/website-deploy.yml
release: workflow_run:
workflows:
- Publish Desktop Artifacts to Release
types: types:
- published - completed
workflow_dispatch: workflow_dispatch:
permissions: permissions:
contents: read contents: read
concurrency: 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' }} cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs: jobs:
build: build:
name: Build website name: Build website
if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
if: github.event_name != 'workflow_run'
uses: actions/checkout@v4 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 - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
@@ -51,7 +61,7 @@ jobs:
run: npm run build:website run: npm run build:website
- name: Prepare SSH - 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: env:
WEBSITE_SSH_KEY: ${{ secrets.WEBSITE_SSH_KEY }} WEBSITE_SSH_KEY: ${{ secrets.WEBSITE_SSH_KEY }}
WEBSITE_SSH_KNOWN_HOSTS: ${{ secrets.WEBSITE_SSH_KNOWN_HOSTS }} WEBSITE_SSH_KNOWN_HOSTS: ${{ secrets.WEBSITE_SSH_KNOWN_HOSTS }}
@@ -66,7 +76,7 @@ jobs:
fi fi
- name: Deploy website - 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: env:
WEBSITE_SSH_USER: ${{ secrets.WEBSITE_SSH_USER }} WEBSITE_SSH_USER: ${{ secrets.WEBSITE_SSH_USER }}
WEBSITE_SSH_PORT: ${{ secrets.WEBSITE_SSH_PORT }} WEBSITE_SSH_PORT: ${{ secrets.WEBSITE_SSH_PORT }}