mirror of
https://github.com/yeasy/docker_practice.git
synced 2024-11-01 20:23:39 +00:00
6c0fc9e416
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
70 lines
2.5 KiB
Go
70 lines
2.5 KiB
Go
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
|
|
- name: vuepress
|
|
run: |
|
|
sudo rm -rf _book
|
|
npm i vuepress --save-dev
|
|
npm i
|
|
npm run vuepress:build
|
|
echo "vuepress.docker-practice.com" > .vuepress/dist/CNAME
|
|
|
|
cp -r _images .vuepress/dist
|
|
cp -r advanced_network/_images .vuepress/dist/advanced_network
|
|
cp -r appendix/_images .vuepress/dist/appendix
|
|
cp -r cases/ci/drone/_images .vuepress/dist/cases/ci/drone
|
|
cp -r cases/os/_images .vuepress/dist/cases/os
|
|
cp -r cloud/_images .vuepress/dist/cloud
|
|
cp -r data_management/_images .vuepress/dist/data_management
|
|
cp -r etcd/_images .vuepress/dist/etcd
|
|
cp -r image/_images .vuepress/dist/image
|
|
cp -r install/_images .vuepress/dist/install
|
|
cp -r introduction/_images .vuepress/dist/introduction
|
|
cp -r kubernetes/_images .vuepress/dist/kubernetes
|
|
cp -r mesos/_images .vuepress/dist/mesos
|
|
cp -r underly/_images .vuepress/dist/underly
|
|
|
|
echo "include: [_images]" > .vuepress/dist/_config
|
|
- name: Upload Vuepress dist
|
|
uses: docker://pcit/pages
|
|
if: github.repository == 'docker-practice/docker_practice'
|
|
env:
|
|
PCIT_EMAIL: khs1994@khs1994.com
|
|
PCIT_GIT_TOKEN: ${{ secrets.PCIT_GIT_TOKEN }}
|
|
PCIT_GIT_URL: github.com/docker-practice/vuepress
|
|
PCIT_KEEP_HISTORY: "true"
|
|
PCIT_LOCAL_DIR: .vuepress/dist
|
|
PCIT_MESSAGE: Sync from yeasy/docker_practice@${{github.sha}} by PCIT
|
|
PCIT_TARGET_BRANCH: master
|
|
PCIT_USERNAME: khs1994
|
|
- name: Set coding.net CNAME
|
|
run: |
|
|
echo "vuepress.mirror.docker-practice.com" > .vuepress/dist/CNAME
|
|
- 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: e.coding.net/dpsigs/docker_practice
|
|
PCIT_KEEP_HISTORY: "true"
|
|
PCIT_LOCAL_DIR: .vuepress/dist
|
|
PCIT_MESSAGE: Sync from yeasy/docker_practice@${{github.sha}} by PCIT
|
|
PCIT_TARGET_BRANCH: master
|
|
PCIT_USERNAME: ptt0xjqzbke3
|