Merge pull request #45 from picture-pro/40-standard-server-fns #101
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI-CD | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build-check-deploy: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v3 | |
- name: Build server package | |
run: nix build | |
- name: Run flake checks | |
run: nix flake check | |
- name: Install flyctl | |
uses: superfly/flyctl-actions/setup-flyctl@master | |
- name: Containerize & Deploy to Fly | |
run: nix build ".#container" -L && docker load < result && flyctl deploy --local-only -i site-server | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} |