db-tutorial/.github/workflows/deploy.yml

37 lines
999 B
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

name: CI
# 在master分支发生push事件时触发。
on:
push:
branches:
- master
env: # 设置环境变量
TZ: Asia/Shanghai # 时区(设置时区可使页面中的`最近更新时间`使用时区时间)
jobs:
build: # 自定义名称
runs-on: ubuntu-latest # 运行在虚拟机环境ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
# 使用的动作。格式userName/repoName。作用检出仓库获取源码。 官方actions库https://github.com/actions
- name: Checkout
uses: actions/checkout@master
# 指定 nodejs 版本
- name: Use Nodejs ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
# 部署
- name: Deploy
env: # 设置环境变量
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
GITEE_TOKEN: ${{ secrets.GITEE_TOKEN }}
run: npm install && npm run deploy