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
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: npm install, build
|
|
|
|
run: |
|
|
|
|
npm install
|
|
|
|
npm run build --if-present
|
|
|
|
env:
|
|
|
|
CI: true
|
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"
|
2020-04-11 18:12:29 +08:00
|
|
|
|
|
|
|
- name: Build Gitee Pages
|
|
|
|
uses: yanglbme/gitee-pages-action@master
|
|
|
|
with:
|
|
|
|
gitee-username: yanglbme
|
|
|
|
gitee-password: ${{ secrets.GITEE_PASSWORD }}
|
2020-04-30 18:04:20 +08:00
|
|
|
gitee-repo: doocs/md
|