-
-
Notifications
You must be signed in to change notification settings - Fork 50
40 lines (36 loc) · 1.04 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
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
python3 -m pip install requests xbstrap
- name: Build Documentation
run: ./aero.py --document
- name: Formatting Check
run: |
./aero.py --fmt
git diff-index --quiet HEAD -- || (printf "${RED}error${NOCOLOR}: formatting check failed, run \`./aero.py --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: ./build/web/