forked from rust-lang/rustup
-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (28 loc) · 936 Bytes
/
deploy-docs.yaml
File metadata and controls
30 lines (28 loc) · 936 Bytes
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
name: Deploy Docs
on:
push:
branches:
- stable
jobs:
doc:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install mdbook
run: |
mkdir mdbook
curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.1/mdbook-v0.4.1-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
echo "`pwd`/mdbook" >> $GITHUB_PATH
- name: Build book
run: cd doc && mdbook build
- name: Deploy to GitHub
run: |
cd doc/book
git init
git config user.name "Deploy from CI"
git config user.email ""
git add . .nojekyll
git commit -m "Deploy $GITHUB_SHA to gh-pages"
git remote add origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git push --force --set-upstream origin master:gh-pages