-
Notifications
You must be signed in to change notification settings - Fork 288
51 lines (45 loc) · 1.38 KB
/
main.yml
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: CI
on:
push:
branches:
- master
pull_request:
jobs:
ci:
name: CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Detect the installed Rust version
id: rustc
run: echo "::set-output name=version::$(rustc -V)"
- name: Cache Cargo's registry cache
uses: actions/cache@v2
with:
path: ~/.cargo/registry/cache
key: cargo-registry-cache-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-registry-cache-
- name: Cache Cargo's registry index
uses: actions/cache@v2
with:
path: ~/.cargo/registry/index
key: cargo-registry-index-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-registry-index-
- name: Cache Cargo's target directory
uses: actions/cache@v2
with:
path: target
key: cargo-build-${{ steps.rustc.outputs.version }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-build-${{ steps.rustc.outputs.version }}-
- run: cargo run
- run: cp CNAME ./site/
- run: touch site/.nojekyll
- uses: JamesIves/github-pages-deploy-action@releases/v3
if: github.ref == 'refs/heads/master'
with:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: site