md/.github/workflows/sync.yml

39 lines
1.0 KiB
YAML
Raw Normal View History

2020-04-01 09:36:24 +08:00
name: Sync
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
2020-05-02 18:59:20 +08:00
strategy:
matrix:
node-version: [8.x, 10.x, 12.x]
2020-04-01 09:36:24 +08:00
steps:
2020-05-02 18:59:20 +08:00
- uses: actions/checkout@v1
2020-05-02 19:28:08 +08:00
- name: Use Node.js 10
2020-05-02 18:59:20 +08:00
uses: actions/setup-node@v1
with:
2020-05-02 19:28:08 +08:00
node-version: 10
2020-05-02 18:59:20 +08:00
- name: npm install, build
2020-05-02 19:25:38 +08:00
uses: yanglbme/gitee-pages-action@master
2020-05-02 18:59:20 +08:00
env:
2020-05-02 19:25:38 +08:00
BRANCH: master # 存放产物的分支名称
FOLDER: dist # 存放build后产物的目录
BUILD_SCRIPT: npm install && npm run build # 执行的命令
2020-04-01 09:36:24 +08:00
- name: Sync to Gitee
uses: wearerequired/git-mirror-action@master
env:
SSH_PRIVATE_KEY: ${{ secrets.GITEE_RSA_PRIVATE_KEY }}
with:
source-repo: "git@github.com:doocs/md.git"
destination-repo: "git@gitee.com:Doocs/md.git"
- name: Build Gitee Pages
uses: yanglbme/gitee-pages-action@master
with:
gitee-username: yanglbme
gitee-password: ${{ secrets.GITEE_PASSWORD }}
gitee-repo: doocs/md