2019-08-31 10:36:00 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
name: CI
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Build GitBook
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@master
|
|
|
|
with:
|
|
|
|
fetch-depth: 2
|
|
|
|
- name: Build
|
|
|
|
uses: docker://yeasy/docker_practice
|
|
|
|
with:
|
|
|
|
args: build
|
2019-10-29 06:31:45 +00:00
|
|
|
- name: vuepress
|
|
|
|
run: |
|
2019-11-06 02:44:57 +00:00
|
|
|
sudo rm -rf _book
|
2019-12-09 05:40:10 +00:00
|
|
|
npm i vuepress --save-dev
|
|
|
|
npm i
|
|
|
|
npm run vuepress:build
|
2019-11-06 05:16:09 +00:00
|
|
|
echo "vuepress.docker-practice.com" > .vuepress/dist/CNAME
|
2019-10-29 06:31:45 +00:00
|
|
|
- name: Upload Vuepress dist
|
|
|
|
uses: docker://pcit/pages
|
2019-11-06 02:44:57 +00:00
|
|
|
if: github.repository == 'docker-practice/docker_practice'
|
2019-10-29 06:31:45 +00:00
|
|
|
env:
|
|
|
|
PCIT_EMAIL: khs1994@khs1994.com
|
|
|
|
PCIT_GIT_TOKEN: ${{ secrets.PCIT_GIT_TOKEN }}
|
|
|
|
PCIT_GIT_URL: github.com/docker-practice/vuepress
|
2019-12-31 12:26:22 +00:00
|
|
|
PCIT_KEEP_HISTORY: "true"
|
2019-10-29 06:31:45 +00:00
|
|
|
PCIT_LOCAL_DIR: .vuepress/dist
|
2019-11-05 13:50:05 +00:00
|
|
|
PCIT_MESSAGE: Sync from yeasy/docker_practice@${{github.sha}} by PCIT
|
2019-10-29 06:31:45 +00:00
|
|
|
PCIT_TARGET_BRANCH: master
|
|
|
|
PCIT_USERNAME: khs1994
|
2019-11-29 15:16:18 +00:00
|
|
|
- name: Set coding.net CNAME
|
|
|
|
run: |
|
|
|
|
echo "vuepress.mirror.docker-practice.com" > .vuepress/dist/CNAME
|
2019-11-06 05:16:09 +00:00
|
|
|
- name: Upload Vuepress dist to coding.net
|
|
|
|
uses: docker://pcit/pages
|
|
|
|
if: github.repository == 'docker-practice/docker_practice'
|
|
|
|
env:
|
|
|
|
PCIT_EMAIL: khs1994@khs1994.com
|
|
|
|
PCIT_GIT_TOKEN: ${{ secrets.CODING_GIT_TOKEN }}
|
|
|
|
PCIT_GIT_URL: git.dev.tencent.com/khs1994/docker_practice
|
2019-12-31 12:26:22 +00:00
|
|
|
PCIT_KEEP_HISTORY: "true"
|
2019-11-06 05:16:09 +00:00
|
|
|
PCIT_LOCAL_DIR: .vuepress/dist
|
|
|
|
PCIT_MESSAGE: Sync from yeasy/docker_practice@${{github.sha}} by PCIT
|
|
|
|
PCIT_TARGET_BRANCH: master
|
|
|
|
PCIT_USERNAME: khs1994
|