37 lines
979 B
YAML
37 lines
979 B
YAML
name: deploy
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "main"
|
|
|
|
env:
|
|
# Need to generate this on the website with: user:read, organization:read,
|
|
# package:write, and repository:write.
|
|
MFGAMES_GITEA_TOKEN: ${{ secrets.MFGAMES_GITEA_TOKEN }}
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: nix
|
|
container:
|
|
volumes:
|
|
- "/nix"
|
|
steps:
|
|
# Checkout the repository so we can load our flake.
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
fetch-tags: true
|
|
|
|
# Break apart downloading all the requirements into a separate step for timing purposes.
|
|
- run: nix develop --command echo prefetch flake
|
|
|
|
# Run the deployment.
|
|
- run: nix develop --command just build
|
|
- run: nix develop --command just test
|
|
- run: nix develop --command just release
|
|
|
|
# Clean up old packages because we aren't mounting the host's store.
|
|
- run: nix-collect-garbage --delete-older-than 15d
|