Skip to content

Commit 659bda7

Browse files
committed
Add check and deploy GitHub workflows
1 parent d7a87a2 commit 659bda7

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

.github/workflows/check.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Check
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- master
7+
8+
workflow_call:
9+
10+
jobs:
11+
check:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v6
15+
- uses: DeterminateSystems/nix-installer-action@main
16+
- uses: DeterminateSystems/magic-nix-cache-action@main
17+
- run: nix flake check -L

.github/workflows/deploy.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
check:
14+
uses: ./.github/workflows/check.yml
15+
16+
deploy:
17+
permissions:
18+
contents: write
19+
needs: [check]
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v6
23+
with:
24+
fetch-depth: 0
25+
26+
- uses: DeterminateSystems/nix-installer-action@main
27+
- uses: DeterminateSystems/magic-nix-cache-action@main
28+
29+
- name: Configure git
30+
run: |
31+
git config user.name "github-actions[bot]"
32+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
33+
34+
- run: nix run .#deploy

0 commit comments

Comments
 (0)