Skip to content

Commit

Permalink
添加持续集成和持续发布
Browse files Browse the repository at this point in the history
  • Loading branch information
martin2011qi committed Mar 20, 2019
1 parent 156ba2a commit b5acd84
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
sudo: required
services: docker
before_install:
- docker pull lctt/lfs-book-build
- mkdir -p $TRAVIS_BUILD_DIR/tmp/output/{lfs-systemd,lfs-sysv}
- sudo chown -R 1000:1000 "$TRAVIS_BUILD_DIR"
script:
- docker run --rm -it -v "$TRAVIS_BUILD_DIR:/home/build/repo" -v "$TRAVIS_BUILD_DIR/tmp/output/lfs-systemd:/home/build/lfs-systemd" lctt/lfs-book-build
- docker run --rm -it -v "$TRAVIS_BUILD_DIR:/home/build/repo" -v "$TRAVIS_BUILD_DIR/tmp/output/lfs-sysv:/home/build/lfs-book" lctt/lfs-book-build make book nochunks pdf V=1
- sudo rsync -a "$TRAVIS_BUILD_DIR/gh-pages/" "$TRAVIS_BUILD_DIR/tmp/output"
- sudo chown -R travis:travis "$TRAVIS_BUILD_DIR"
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
local_dir: tmp/output
on:
all_branches: true
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Dockerfile for build LFS book.
#
# Note: ubuntu is chosen because Java is required for fop.

FROM ubuntu:latest
MAINTAINER Wenxuan Zhao <[email protected]>

RUN useradd -m -s /bin/bash -u 1000 -U build \
&& apt-get update \
&& apt-get install -y make tidy libxml2-utils docbook-utils xsltproc fop \
docbook-xsl ttf-wqy-microhei ttf-wqy-zenhei bzip2 \
&& rm -rf /var/lib/apt/lists/*

USER build
WORKDIR /home/build/repo

CMD ["make", "book", "nochunks", "pdf", "REV=systemd", "V=1"]

0 comments on commit b5acd84

Please sign in to comment.