Files
homepage/.gitea/workflows/ci.yaml
T
Greg Hellings dc44452c04
buildbot/nix-eval Build done.
buildbot/nix-build Build done.
buildbot/nix-effects Build done.
Build, Push, and Deploy / build (push) Successful in 2m4s
Build, Push, and Deploy / deploy (push) Failing after 0s
fix: use buildah import syntax
2026-08-04 09:16:46 -05:00

41 lines
1.0 KiB
YAML

name: Build, Push, and Deploy
on:
push:
branches:
- main
env:
REGISTRY: src.thehellings.com
IMAGE: src.thehellings.com/greg/homepage:latest
jobs:
build:
runs-on: nix-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build site image
run: |
nix --extra-experimental-features nix-command --extra-experimental-features flakes build .
cp -L result result.tar.gz
- name: Log in to Gitea container registry
run: buildah login -u ${{ secrets.REGISTRY_USER }} -p ${{ secrets.REGISTRY_PASSWORD }} ${{ env.REGISTRY }}
- name: Push image
run: |
buildah from docker-archive:result.tar.gz
buildah tag "localhost/gregs-homepage:latest" ${{ env.IMAGE }}
buildah push ${{ env.IMAGE }}
deploy:
runs-on: blog
needs: push
steps:
- name: Pull image and restart service
run: |
sudo podman pull ${{ env.IMAGE }}
sudo systemctl restart podman-homepage