Skip to content

Commit 992abe2

Browse files
authored
Merge pull request #3136 from ehuss/gh-actions
Switch from travis to github actions.
2 parents aba44c1 + 21029cd commit 992abe2

File tree

2 files changed

+34
-22
lines changed

2 files changed

+34
-22
lines changed

.github/workflows/deploy.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Deploy
2+
on:
3+
push:
4+
branches:
5+
- master
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
with:
13+
fetch-depth: 0
14+
- name: Install mdbook
15+
run: |
16+
mkdir mdbook
17+
curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.10/mdbook-v0.4.10-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
18+
echo `pwd`/mdbook >> $GITHUB_PATH
19+
- name: Generate Book
20+
run: |
21+
./generate-book.sh
22+
- name: Deploy GitHub Pages
23+
run: |
24+
git worktree add gh-pages gh-pages
25+
git config user.name "Deploy from CI"
26+
git config user.email ""
27+
cd gh-pages
28+
# Delete the ref to avoid keeping history.
29+
git update-ref -d refs/heads/gh-pages
30+
rm -rf *
31+
mv ../book/* .
32+
git add .
33+
git commit -m "Deploy $GITHUB_SHA to gh-pages"
34+
git push --force

.travis.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)