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

Loading…
Cancel
Save