更新 【视频】使用 Notion Flow 简化你的博客发布流程 ! #217
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: 腾讯云 cos 同步任务 | |
# 代码 push 到本仓库的时候触发该 ci | |
# 分析提交的 commits(不只是 head commit),将全部的 added modify 归结到一起(去重)调用上传方法 | |
# 将 delete 的,调用删除方法 | |
on: | |
push: | |
branches: [cn] | |
jobs: | |
CheckOutAndUpload: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 检出分支 | |
uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: 设置 node 环境 | |
uses: actions/[email protected] | |
with: | |
node-version: 14.x | |
architecture: x64 | |
cache: npm | |
- name: 安装依赖 | |
run: npm i | |
- name: 运行上传脚本 | |
uses: actions/github-script@v5 | |
env: | |
COS_SECRET_ID: ${{secrets.COS_SECRET_ID}} | |
COS_SECRET_KEY: ${{secrets.COS_SECRET_KEY}} | |
COS_BUCKET: ${{secrets.COS_BUCKET}} | |
COS_REGION: ${{secrets.COS_REGION}} | |
with: | |
script: | | |
const script = require('./cn_upload.js') | |
await script({github, context, core}) | |