ucalendar.cn #55
Workflow file for this run
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
# action的名称 | |
name: ucalendar.cn | |
# 运行器 的名称 | |
run-name: ucalendar.cn | |
# 监听指定分支的push和pull_request事件 | |
on: | |
push: | |
tags: | |
- v1.* | |
jobs: | |
# 运行的任务 build_deploy | |
build_deploy: | |
runs-on: ubuntu-latest # 任务运行在最新的操作平台 | |
strategy: | |
matrix: | |
node-version: [ 18.x ] # 通过指定多个版本,从而对多个版本都进行测试 | |
steps: | |
- uses: actions/checkout@v3 # checkout的妙用 https://github.com/actions/checkout | |
- uses: actions/setup-node@v3 # 使用 setup-node v3 版本来安装指定的nodejs | |
with: | |
node-version: ${{ matrix.node-version }} # 这里可以指定特定版本,也可以引用变量 | |
- run: npm install # 执行命令 | |
- run: npm run build # 执行命令 | |
name: '部署' | |
- uses: cross-the-world/scp-pipeline@master | |
with: | |
host: ${{ secrets.USER_HOST }} | |
user: ${{ secrets.USER_NAME }} | |
pass: ${{ secrets.USER_PASS }} | |
connect_timeout: 20s | |
local: './dist/*' | |
remote: /usr/local/nginx/html | |