del: imaotai图片 #21
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
name: CI | |
#on: [push] | |
# 在master分支发生push事件时触发。 | |
on: | |
push: | |
branches: | |
- master | |
jobs: # 工作流 | |
build: # 自定义名称 | |
runs-on: ubuntu-latest #运行在虚拟机环境ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [14.x] | |
steps: # 步骤 | |
# 步骤1 | |
- name: Checkout | |
# 使用的动作。格式:userName/repoName。作用:检出仓库,获取源码。 官方actions库:https://github.com/actions | |
uses: actions/checkout@v1 | |
- name: Use Node.js ${{ matrix.node-version }} # 步骤2 | |
uses: actions/setup-node@v1 # 作用:安装nodejs | |
with: | |
node-version: ${{ matrix.node-version }} # 版本 | |
# 步骤2:执行脚本deploy.sh | |
- name: run deploy.sh | |
env: # 设置环境变量,未设置则不运行 | |
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} # toKen私密变量 | |
SSH_PRIVATE_KEY: ${{ secrets.GITEE_RSA_PRIVATE_KEY }} # gitee的ssh | |
run: npm install && npm run deploy | |