File tree 3 files changed +40
-36
lines changed
3 files changed +40
-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
+ run : |
28
+ REV=$(git rev-parse --short HEAD)
29
+ git init
30
+ git remote add upstream https://x-access-token:${{secrets.GITHUB_TOKEN}}@github.com/rust-lang/api-guidelines
31
+ git config user.name "Rust API Guidelines"
32
+ git config user.email "[email protected] "
33
+ git add -A .
34
+ git commit -qm "API Guidelines @ ${{github.repository}}@${REV}"
35
+ eval `ssh-agent`
36
+ ssh-add - <<< "$deploy_key"
37
+ 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