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

51 lines
1.2 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
2024-08-08 07:46:18 +00:00
- name: Set up Go
uses: actions/setup-go@v2
2022-08-04 06:16:21 +00:00
with:
2024-08-08 07:46:18 +00:00
go-version: 1.21
2022-08-04 06:16:21 +00:00
2024-08-08 07:46:18 +00:00
- run: go version
- run: go env
2024-08-13 00:15:19 +00:00
- run: go install github.com/wa-lang/wabook@latest
- run: wabook build
2022-08-04 06:16:21 +00:00
- 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'