refactor: update github action script

This commit is contained in:
ruanyf
2024-06-08 17:37:39 +08:00
parent 154b0a1f3a
commit 2a3dfdfc1b

View File

@@ -10,29 +10,28 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v4
with: with:
persist-credentials: false persist-credentials: false
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@main uses: actions/setup-node@v4
with: with:
node-version: '14' node-version: 'latest'
- name: Install dependencies - name: Install dependencies
run: npm install run: npm install
- name: Build pages - name: Build pages
run: npm run build run: npm run build
- name: Deploy to website - name: Deploy to website
uses: JamesIves/github-pages-deploy-action@3.7.1 uses: JamesIves/github-pages-deploy-action@v4
with: with:
GIT_CONFIG_NAME: wangdoc-bot git-config-name: wangdoc-bot
GIT_CONFIG_EMAIL: yifeng.ruan@gmail.com git-config-email: yifeng.ruan@gmail.com
REPOSITORY_NAME: wangdoc/website repository-name: wangdoc/website
ACCESS_TOKEN: ${{ secrets.WANGDOC_BOT_TOKEN }} token: ${{ secrets.WANGDOC_BOT_TOKEN }}
BASE_BRANCH: master branch: master
BRANCH: master # The branch the action should deploy to. folder: dist # The folder the action should deploy.
FOLDER: dist # The folder the action should deploy. target-folder: dist/es6
TARGET_FOLDER: dist/es6 clean: true # Automatically remove deleted files from the deploy branch
CLEAN: true # Automatically remove deleted files from the deploy branch commit-message: update from ES6 tutorial
COMMIT_MESSAGE: update from ES6 tutorial