File tree 3 files changed +42
-36
lines changed 3 files changed +42
-36
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish
2
+
3
+ on :
4
+ push :
5
+ pull_request :
6
+
7
+ jobs :
8
+ publish :
9
+ name : GitHub Pages
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - uses : actions/checkout@v2
13
+
14
+ - name : Get mdBook
15
+ run : |
16
+ export MDBOOK_VERSION="v0.4.2"
17
+ export MDBOOK_TARBALL="mdbook-${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz"
18
+ export MDBOOK_URL="https://github.com/rust-lang/mdBook/releases/download/${MDBOOK_VERSION}/${MDBOOK_TARBALL}"
19
+ curl -Lf "${MDBOOK_URL}" | tar -xz
20
+
21
+ - name : Build
22
+ run : ./mdbook build
23
+
24
+ - name : Push to gh-pages
25
+ if : ${{github.ref == 'master'}}
26
+ working-directory : book
27
+ env :
28
+ deploy_key : ${{secrets.DEPLOY_KEY}}
29
+ run : |
30
+ REV=$(git rev-parse --short HEAD)
31
+ git init
32
+ git remote add upstream https://x-access-token:${{secrets.GITHUB_TOKEN}}@github.com/rust-lang/api-guidelines
33
+ git config user.name "Rust API Guidelines"
34
+ git config user.email "[email protected] "
35
+ git add -A .
36
+ git commit -qm "API Guidelines @ ${{github.repository}}@${REV}"
37
+ eval `ssh-agent`
38
+ ssh-add - <<< "$deploy_key"
39
+ git push -q upstream HEAD:refs/heads/gh-pages-test --force
Original file line number Diff line number Diff line change 1
- book
1
+ /book
2
+ /mdbook
3
+ /mdbook- * .tar.gz
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments