Skip to content

修复GitHub Actions工作流中的GITHUB_TOKEN引用,确保正确使用密钥 #22

修复GitHub Actions工作流中的GITHUB_TOKEN引用,确保正确使用密钥

修复GitHub Actions工作流中的GITHUB_TOKEN引用,确保正确使用密钥 #22

name: Build and Deploy
on: [push]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
with:
# fetch all commits to get last updated time or other git log info
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 12
- name: Install deps
run: yarn
- name: Build VuePress site
run: yarn build
# please check out the docs of the workflow for more details
# @see https://github.com/crazy-max/ghaction-github-pages
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v4
with:
target_branch: gh_pages
build_dir: docs/.vuepress/dist/
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}