Files
wehub-resource-sync 1d1286fadb
Build / Build and test (push) Waiting to run
chore: import upstream snapshot with attribution
2026-07-13 13:18:38 +08:00

69 lines
1.5 KiB
YAML

name: Deploy Pages
on:
workflow_run:
workflows:
- Release
- Plugin Release
types:
- completed
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
deploy:
name: Deploy site to GitHub Pages
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout main
uses: actions/checkout@v5
with:
ref: main
- name: Configure Pages
uses: actions/configure-pages@v5
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
cache-dependency-path: site/package-lock.json
- name: Install site dependencies
working-directory: site
run: npm ci
- name: Build site
working-directory: site
run: npm run build
- name: Prepare Pages artifact
run: |
rm -rf build/pages
mkdir -p build/pages
cp -R docs/. build/pages/
cp -R site/dist/. build/pages/
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v4
with:
path: build/pages
- name: Deploy GitHub Pages
id: deployment
uses: actions/deploy-pages@v4