gopl-zh.github.com/.github/workflows/book.yml

48 lines
1.1 KiB
YAML
Raw Normal View History

2022-08-04 06:16:21 +00:00
name: mdbook
on:
push:
branches:
- main
- master
- "releases/*"
pull_request:
branches:
- main
- master
types:
- closed
jobs:
deploy:
2022-08-08 15:55:49 +00:00
runs-on: ubuntu-22.04
2022-08-04 06:16:21 +00:00
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.4.10'
# mdbook-version: 'latest'
- run: mdbook build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.DEPLOY_KEY }}
publish_dir: ./book
publish_branch: gh-pages
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
2022-08-24 13:43:05 +00:00
- name: Deploy Golang-China
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.GOLANG_CHINA_DEPLOY_KEY }}
external_repository: golang-china/gopl-zh
publish_dir: ./book
publish_branch: gh-pages
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'