Sync from docker/docker.github.io@feaf1d0 by PCIT #584
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
name: GitBook | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
with: | |
fetch-depth: 2 | |
- name: gitbook-build | |
uses: docker://khs1994/gitbook | |
- name: gitbook-deploy | |
if: github.event_name == 'push' | |
uses: docker://khs1994/gitbook | |
with: | |
args: deploy | |
env: | |
GIT_USERNAME: "khs1994" | |
GIT_USEREMAIL: "[email protected]" | |
GIT_BRANCH: "gh-pages" | |
# 必须使用自己的 token, actions 的 token 不会触发 master 的 actions | |
GITHUB_TOKEN: ${{ secrets.PCIT_GIT_TOKEN }} |