-
-
Notifications
You must be signed in to change notification settings - Fork 50
41 lines (37 loc) · 1.05 KB
/
build.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
name: Aero
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
RED: '\033[1;31m'
NOCOLOR: '\033[0m'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y nasm make
- name: Build Documentation
run: |
make doc
find ./target -type d -name .git -prune -exec rm -rf {} \;
- name: Formatting Check
run: |
make check_fmt
git diff-index --quiet HEAD -- || (printf "${RED}error${NOCOLOR}: formatting check failed, run \`make fmt\`\n" && exit 1)
- name: Deploy documentation
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/master' && (github.event_name == 'push' || github.event_name == 'schedule')
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/doc/