chore: update workflow

dependabot/npm_and_yarn/vite-5.4.20
acbin 5 months ago committed by GitHub
parent 7f81bb783d
commit 9078588672
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -6,9 +6,8 @@ on:
workflow_dispatch:
jobs:
docs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
@ -19,9 +18,6 @@ jobs:
with:
node-version: 22
cache: npm
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install dependencies
run: npm ci
@ -29,24 +25,24 @@ jobs:
- name: Build with VitePress
run: npm run docs:build
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v4
- name: Generate CNAME
run: echo "schunter.doocs.org" > docs/.vitepress/dist/CNAME
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
target_branch: gh-pages
build_dir: docs/.vitepress/dist
fqdn: schunter.doocs.org
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
path: docs/.vitepress/dist
build:
deploy:
needs: build
runs-on: ubuntu-latest
if: github.repository == 'doocs/source-code-hunter'
needs: docs
permissions:
pages: write
id-token: write
environment:
name: github_pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Sync to Gitee
uses: wearerequired/git-mirror-action@master
env:
SSH_PRIVATE_KEY: ${{ secrets.GITEE_RSA_PRIVATE_KEY }}
with:
source-repo: git@github.com:doocs/source-code-hunter.git
destination-repo: git@gitee.com:Doocs/source-code-hunter.git
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

Loading…
Cancel
Save