mirror of https://github.com/Dreamacro/clash.git
43 lines
1.0 KiB
YAML
43 lines
1.0 KiB
YAML
name: Deploy
|
|
on:
|
|
workflow_dispatch: {}
|
|
push:
|
|
branches:
|
|
- master
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node-version: [20]
|
|
permissions:
|
|
pages: write
|
|
id-token: write
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: pnpm/action-setup@v2
|
|
with:
|
|
version: latest
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
- name: Install dependencies
|
|
working-directory: docs
|
|
run: pnpm install --frozen-lockfile=false
|
|
- name: Build
|
|
working-directory: docs
|
|
run: pnpm run docs:build
|
|
- uses: actions/configure-pages@v2
|
|
- uses: actions/upload-pages-artifact@v1
|
|
with:
|
|
path: docs/.vitepress/dist
|
|
- name: Deploy
|
|
id: deployment
|
|
uses: actions/deploy-pages@v2
|