-
Notifications
You must be signed in to change notification settings - Fork 3
62 lines (53 loc) · 1.72 KB
/
Copy pathrender.yml
File metadata and controls
62 lines (53 loc) · 1.72 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Update GitHub Pages
on:
push:
branches:
- master
jobs:
release:
name: GitHub Pages
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
# Todo: cache this as a tool
- name: Setup mdBook
shell: pwsh
run: |
Invoke-WebRequest -OutFile mdbook.tgz (
Invoke-RestMethod https://api.github.com/repos/rust-lang/mdBook/releases/latest
).assets.where{$_.name -like "*linux-gnu.tar.gz"}.browser_download_url
tar -zxvf mdbook.tgz
Remove-Item mdbook.tgz
mkdir ~/bin
Move-Item ./mdbook ~/bin/mdbook
"~/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
# - name: Checkout PR
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: gh pr checkout ${{ github.event.pull_request.number }}
- name: Build Book
run: |
mdbook build
# cp ./config/CNAME ./book/CNAME
- name: Setup git config
run: |
# setup the username and email.
git config user.name "mdbook build bot"
git config user.email "<>"
- name: Push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git add docs/*
git commit -m "mdbook build output"
git push
# - name: Deploy Book
# env:
# ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
# PUBLISH_BRANCH: gh-pages
# PUBLISH_DIR: ./book
# SCRIPT_MODE: true
# run: |
# wget https://raw.githubusercontent.com/peaceiris/actions-gh-pages/v2.5.0/entrypoint.sh
# bash ./entrypoint.sh