Skip to content

Commit 030ea6a

Browse files
bors[bot]adamgreig
andauthored
Merge #29
29: Swap to GHA r=eldruin a=adamgreig Same setup as book and discovery so should be OK but as usual a bit hard to test. Hopefully CI passes on this commit, then we'll see if it pushed the website correctly after merge. Co-authored-by: Adam Greig <adam@adamgreig.com>
2 parents e66f2a1 + fd6163f commit 030ea6a

File tree

6 files changed

+56
-54
lines changed

6 files changed

+56
-54
lines changed

.github/bors.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
block_labels = ["S-blocked", "S-waiting-on-team"]
22
delete_merged_branches = true
33
required_approvals = 1
4-
status = ["continuous-integration/travis-ci/push"]
4+
status = ["build"]

.github/workflows/ci.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ staging, trying, master ]
6+
pull_request:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-20.04
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions-rs/toolchain@v1
14+
with:
15+
profile: minimal
16+
toolchain: stable
17+
18+
- name: Install Python dependencies
19+
run: |
20+
pip3 install --user python-dateutil linkchecker
21+
- name: Put pip binary directory into path
22+
run: echo "~/.local/bin" >> $GITHUB_PATH
23+
24+
- name: Cache Cargo installed binaries
25+
uses: actions/cache@v1
26+
id: cache-cargo
27+
with:
28+
path: ~/cargo-bin
29+
key: cache-cargo
30+
- name: Install mdbook
31+
if: steps.cache-cargo.outputs.cache-hit != 'true'
32+
uses: actions-rs/install@v0.1
33+
with:
34+
crate: mdbook
35+
version: latest
36+
- name: Copy mdbook to cache directory
37+
if: steps.cache-cargo.outputs.cache-hit != 'true'
38+
run: |
39+
mkdir ~/cargo-bin
40+
cp ~/.cargo/bin/mdbook ~/cargo-bin
41+
- name: Put new cargo binary directory into path
42+
run: echo "~/cargo-bin" >> $GITHUB_PATH
43+
44+
- name: Build site
45+
run: cargo run
46+
- name: Check links
47+
run: linkchecker public
48+
49+
- name: Deploy book
50+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
51+
uses: peaceiris/actions-gh-pages@v3
52+
with:
53+
github_token: ${{ secrets.GITHUB_TOKEN }}
54+
publish_dir: public
55+
force_orphan: true

.travis.yml

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

ci/after-success.sh

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

ci/install.sh

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

ci/script.sh

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

0 commit comments

Comments
 (0)