-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (40 loc) · 1.04 KB
/
create_book.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: github pages
permissions:
contents: write
pages: write
id-token: write
on:
push:
branches:
- main
pull_request:
jobs:
deploy:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install gettext
run: |
sudo apt update
sudo apt install gettext
- name: Install mdbook
uses: taiki-e/cache-cargo-install-action@v2
with:
locked: false
tool: [email protected]
- name: Install mdbook-i18n-helpers
uses: taiki-e/cache-cargo-install-action@v2
# noinspection YAMLSchemaValidation
with:
locked: false
tool: [email protected]
- name: Build the book
run: sh scripts/full-build.sh
- name: Copy CNAME
run: cp config/CNAME book/CNAME
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book