Skip to content

Commit 12e4355

Browse files
authored
Add Github Action: Create crystal.yml
1 parent 8262f0e commit 12e4355

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/crystal.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Crystal CI
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
container:
15+
image: crystallang/crystal
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Install dependencies
20+
run: shards install
21+
- name: Run tests
22+
run: crystal spec
23+
- name: Check format
24+
run: crystal tool format --check
25+
- name: Generate Docs
26+
run: crystal docs
27+
28+
- name: Deploy docs to GitHub Pages
29+
uses: peaceiris/actions-gh-pages@v4
30+
with:
31+
github_token: ${{ secrets.GITHUB_TOKEN }}
32+
# Adjust publish_dir if your docs are generated somewhere else
33+
publish_dir: ./docs
34+
publish_branch: gh-pages

0 commit comments

Comments
 (0)