-
Notifications
You must be signed in to change notification settings - Fork 317
85 lines (73 loc) · 1.75 KB
/
ci.yml
File metadata and controls
85 lines (73 loc) · 1.75 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: CI
on:
push:
branches:
- main
paths-ignore:
- 'README.md'
- 'LICENSE'
- 'CODE_OF_CONDUCT.md'
pull_request:
branches:
- main
paths-ignore:
- 'README.md'
- 'LICENSE'
- 'CODE_OF_CONDUCT.md'
permissions:
id-token: write
contents: write
jobs:
test:
runs-on: github-gpu
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: |
~/.modular
~/.cache/modular
key: ${{ runner.os }}-modular-${{ hashFiles('**/pixi.toml') }}
- uses: prefix-dev/setup-pixi@v0.9.0
with:
pixi-version: v0.53.0
cache: false
post-cleanup: false
- name: Check formatting
shell: bash
run: |
pixi run format-check
- name: Tests
shell: bash
run: |
pixi run tests
deploy:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: |
~/.modular
~/.cache/modular
key: ${{ runner.os }}-modular-${{ hashFiles('**/pixi.toml') }}
- uses: prefix-dev/setup-pixi@v0.9.0
with:
pixi-version: v0.53.0
cache: false
post-cleanup: false
- name: Build
shell: bash
run: |
cd book
pixi run build-book
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./book/html
cname: puzzles.modular.com
allow_empty_commit: true