remove project travis ci

Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
pull/481/head
Kang Huaishuai 2020-12-20 22:32:04 +08:00
parent cc726421c8
commit fb162df033
No known key found for this signature in database
GPG Key ID: 5E515022F565DA09
6 changed files with 51 additions and 76 deletions

1
.github/CODEOWNERS vendored
View File

@ -28,7 +28,6 @@
/.editorconfig/ @khs1994 /.editorconfig/ @khs1994
/.gitattributes @khs1994 /.gitattributes @khs1994
/.gitignore @khs1994 /.gitignore @khs1994
/.travis.yml @khs1994
/_config.yml @yeasy @khs1994 /_config.yml @yeasy @khs1994
/book.json @yeasy @khs1994 /book.json @yeasy @khs1994
/CHANGELOG.md @yeasy @khs1994 /CHANGELOG.md @yeasy @khs1994

View File

@ -7,16 +7,58 @@ name: CI
jobs: jobs:
build: build:
name: Build GitBook name: Build
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@master - uses: actions/checkout@master
with: with:
fetch-depth: 2 fetch-depth: 2
- name: Build - name: Build Gitbook
uses: docker://yeasy/docker_practice uses: docker://yeasy/docker_practice
with: with:
args: build args: build
- name: Build Gitbook Docker Image
if: github.repository == 'docker-practice/docker_practice'
run: |
sudo chmod -R 777 _book
echo "FROM nginx:alpine" >> Dockerfile
echo "COPY _book /usr/share/nginx/html" >> Dockerfile
echo "COPY .docker/docker-entrypoint.sh /" >> Dockerfile
echo "ENTRYPOINT [\"/docker-entrypoint.sh\"]" >> Dockerfile
export VCS_REF=`git rev-parse --short HEAD`
docker build \
-t dockerpracticesig/docker_practice \
-t dockerpracticesig/docker_practice:gitbook \
--label org.opencontainers.image.revision=$VCS_REF \
--label org.opencontainers.image.source="https://github.com/yeasy/docker_practice" \
--label maintainer="https://github.com/docker-practice" \
.
docker run -d --rm -p 4000:80 dockerpracticesig/docker_practice
sleep 5
curl 127.0.0.1:4000
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker push dockerpracticesig/docker_practice
docker push dockerpracticesig/docker_practice:gitbook
env:
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
- name: Upload Gitbook 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/zh-cn
PCIT_KEEP_HISTORY: "true"
PCIT_LOCAL_DIR: _book
PCIT_MESSAGE: Build from yeasy/docker_practice@${{github.sha}}
PCIT_TARGET_BRANCH: master
PCIT_USERNAME: khs1994
- name: vuepress - name: vuepress
run: | run: |
sudo rm -rf _book sudo rm -rf _book
@ -73,7 +115,7 @@ jobs:
PCIT_GIT_URL: e.coding.net/dpsigs/docker_practice PCIT_GIT_URL: e.coding.net/dpsigs/docker_practice
PCIT_KEEP_HISTORY: "true" PCIT_KEEP_HISTORY: "true"
PCIT_LOCAL_DIR: .vuepress/dist PCIT_LOCAL_DIR: .vuepress/dist
PCIT_MESSAGE: Sync from yeasy/docker_practice@${{github.sha}} by PCIT PCIT_MESSAGE: Build from yeasy/docker_practice@${{github.sha}}
PCIT_TARGET_BRANCH: master PCIT_TARGET_BRANCH: master
PCIT_USERNAME: ptt0xjqzbke3 PCIT_USERNAME: ptt0xjqzbke3
- name: Build vuepress docker image - name: Build vuepress docker image

View File

@ -1,65 +0,0 @@
language: bash
services:
- docker
before_install:
- openssl aes-256-cbc -K $encrypted_6cc8cff04075_key -iv $encrypted_6cc8cff04075_iv
-in .travis/id_rsa.enc -out ~/.ssh/id_rsa -d
- chmod 600 ~/.ssh/id_rsa
- export TZ='Asia/Shanghai'
- date
- git config --global user.name "khs1994"
- git config --global user.email "khs1994@khs1994.com"
script:
- docker run -it --rm -v $PWD:/srv/gitbook-src yeasy/docker_practice build
after_success:
- sudo chmod -R 777 _book
- echo "FROM nginx:alpine" >> Dockerfile
- echo "COPY _book /usr/share/nginx/html" >> Dockerfile
- echo "COPY .docker/docker-entrypoint.sh /" >> Dockerfile
- echo "ENTRYPOINT [\"/docker-entrypoint.sh\"]" >> Dockerfile
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- export VCS_REF=`git rev-parse --short HEAD`
- |
docker build \
-t dockerpracticesig/docker_practice \
-t dockerpracticesig/docker_practice:gitbook \
--label org.opencontainers.image.revision=$VCS_REF \
--label org.opencontainers.image.source="https://github.com/yeasy/docker_practice" \
--label maintainer="https://github.com/docker-practice" \
.
- docker run -dit --rm -p 4000:80 dockerpracticesig/docker_practice
- sleep 5
- curl 127.0.0.1:4000
- docker push dockerpracticesig/docker_practice
- docker push dockerpracticesig/docker_practice:gitbook
- cd _book
- rm -rf .github/workflows
- git init
- git remote add origin "$DEPLOY_REPO"
- git add .
- COMMIT=`date "+%F %T"`
- git commit -m "Travis CI Site updated $COMMIT yeasy/docker_practice@${TRAVIS_COMMIT}"
- git push -f origin master:"$DEPLOY_BRANCH"
env:
global:
- DEPLOY_BRANCH: master
- DEPLOY_REPO: git@github.com:docker-practice/zh-cn.git
addons:
ssh_known_hosts:
- github.com
branches:
only:
- master

Binary file not shown.

View File

@ -1,14 +1,13 @@
# Docker # Docker
[![](https://img.shields.io/github/stars/yeasy/docker_practice.svg?style=social&label=Stars)](https://github.com/yeasy/docker_practice) [![](https://travis-ci.org/yeasy/docker_practice.svg?branch=master)](https://travis-ci.org/yeasy/docker_practice) [![](https://img.shields.io/github/release/yeasy/docker_practice/all.svg)](https://github.com/yeasy/docker_practice/releases) [![](https://img.shields.io/badge/Based-Docker%20CE%20v20.10-blue.svg)](https://github.com/docker/docker-ce) [![](https://img.shields.io/badge/Docker%20%E6%8A%80%E6%9C%AF%E5%85%A5%E9%97%A8%E4%B8%8E%E5%AE%9E%E6%88%98-jd.com-red.svg)][1] [![](https://img.shields.io/github/stars/yeasy/docker_practice.svg?style=social&label=Stars)](https://github.com/yeasy/docker_practice) [![](https://img.shields.io/github/release/yeasy/docker_practice/all.svg)](https://github.com/yeasy/docker_practice/releases) [![](https://img.shields.io/badge/Based-Docker%20CE%20v20.10-blue.svg)](https://github.com/docker/docker-ce) [![](https://img.shields.io/badge/Docker%20%E6%8A%80%E6%9C%AF%E5%85%A5%E9%97%A8%E4%B8%8E%E5%AE%9E%E6%88%98-jd.com-red.svg)][1]
**v1.3.0** **v1.3.0**
| | | - | | | - |
| :------------- | :------------- | :--- | | :------------- | :--- |
| [zh-hans](https://github.com/yeasy/docker_practice) | [![](https://travis-ci.org/yeasy/docker_practice.svg?branch=master)](https://travis-ci.org/yeasy/docker_practice)| [阅读](https://vuepress.mirror.docker-practice.com/) | | [](https://github.com/yeasy/docker_practice) | [阅读](https://vuepress.mirror.docker-practice.com/) |
| [us-en](https://github.com/yeasy/docker_practice/tree/english) | [![](https://travis-ci.org/yeasy/docker_practice.svg?branch=english)](https://travis-ci.org/yeasy/docker_practice)| [阅读](https://docker_practice.gitee.io/us-en) | | [us-en](https://github.com/yeasy/docker_practice/tree/english) | [阅读](https://docker_practice.gitee.io/us-en) |
| [zh-hant](https://github.com/yeasy/docker_practice/tree/zh-Hant) | [![](https://travis-ci.org/yeasy/docker_practice.svg?branch=zh-hant)](https://travis-ci.org/yeasy/docker_practice)| [阅读](https://docker_practice.gitee.io/zh-hant) |
[Docker](https://www.docker.com) 是个划时代的开源项目,它彻底释放了计算虚拟化的威力,极大提高了应用的维护效率,降低了云计算应用开发的成本!使用 Docker可以让应用的部署、测试和分发都变得前所未有的高效和轻松 [Docker](https://www.docker.com) 是个划时代的开源项目,它彻底释放了计算虚拟化的威力,极大提高了应用的维护效率,降低了云计算应用开发的成本!使用 Docker可以让应用的部署、测试和分发都变得前所未有的高效和轻松

View File

@ -21,7 +21,7 @@ services:
# $ docker run -it --rm -p 4000:80 dockerpracticesig/docker_practice # $ docker run -it --rm -p 4000:80 dockerpracticesig/docker_practice
offline: offline:
# this image build by travis ci # this image build by GitHub Action
image: dockerpracticesig/docker_practice image: dockerpracticesig/docker_practice
ports: ports:
- 4000:80 - 4000:80