-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (29 loc) · 781 Bytes
/
Copy pathcd.yml
File metadata and controls
31 lines (29 loc) · 781 Bytes
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
name: Build and Deploy
on:
push:
branches:
- main
workflow_dispatch: {}
permissions:
contents: read
actions: write
packages: write
jobs:
deploy-prod:
name: Deploy To Production
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- name: Run Tests
run: |
echo "Running tests before deployment..."
nix run --accept-flake-config .#runTests
env:
CI: true
- name: Deploy to Production
run: |
echo "Tests passed! Deploying to Production environment on Fly.io..."
nix run --accept-flake-config .#deployPackage
env:
FLY_AUTH_TOKEN: ${{ secrets.FLY_AUTH_TOKEN }}