feat: add logLevel option #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: example | |
on: | |
push: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install pnpm | |
uses: pnpm/[email protected] | |
- name: Set node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
cache: pnpm | |
- name: Cache dependencies | |
uses: actions/cache@v1 | |
env: | |
cache-name: cache-node-modules | |
with: | |
# 需要缓存的文件的路径 | |
path: ./node_modules | |
# 对缓存的文件指定的唯一标识 | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./package.json') }} | |
# 用于没有再找目标key的缓存的backup选项 | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Install | |
run: pnpm install | |
- name: Build | |
run: pnpm run demo:build | |
- name: 📂 Sync files | |
uses: crazy-max/ghaction-github-pages@v2 | |
with: | |
# 部署到 gh-pages 分支 | |
target_branch: gh-pages | |
# 部署目录为 VuePress 的默认输出目录 | |
build_dir: ./example/dist | |
env: | |
# @see https://docs.github.com/cn/actions/reference/authentication-in-a-workflow#about-the-github_token-secret | |
GITHUB_TOKEN: ${{ secrets.ACTIONS_DEPLOY_KEY }} |