From 3e14d0c61e357c4d225e41673a01d1866cd91479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B2=B3=E6=99=93=E4=BA=AE?= <2220124666@qq.com> Date: Tue, 30 Jul 2024 09:38:46 +0800 Subject: [PATCH] ci: update gh-pages.yml --- .github/workflows/gh-pages.yml | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index b17efe2..c75e040 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -4,20 +4,21 @@ on: push: branches: - master - workflow_dispatch: + +permissions: + contents: write jobs: deploy: runs-on: ubuntu-latest - env: - DOCS_GA_ID: G-CTB8FQ7VMW - NODE_VERSION: '16' - steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + + - name: Set node + uses: actions/setup-node@v4 with: - fetch-depth: 0 + node-version: lts/* - name: Install ttf-mscorefonts run: sudo apt-get install ttf-mscorefonts-installer @@ -28,15 +29,8 @@ jobs: - name: Install Fonts run: sudo cp -r fonts/ /usr/share/fonts && sudo mkfontscale && sudo mkfontdir && sudo fc-cache -fv - - name: Setup pnpm - uses: pnpm/action-setup@v4 - with: - version: 8 - - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version: ${{ env.NODE_VERSION }} + - name: Install pnpm + uses: pnpm/action-setup@v3 - name: Install dependencies run: pnpm install @@ -44,13 +38,11 @@ jobs: - name: Build documentation site run: pnpm build - - name: Create CNAME - run: cd dist && echo "resume.yuexiaoliang.com" > CNAME - - name: Deploy to GitHub Pages - uses: crazy-max/ghaction-github-pages@v2.2.0 + uses: crazy-max/ghaction-github-pages@v4.0.0 with: target_branch: gh-pages build_dir: dist + fqdn: resume.yuexiaoliang.com env: - GH_PAT: ${{ secrets.ACTION_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}