bestdadjokes/.forgejo/workflows/deploy.yml
djg 572d5bfa94
All checks were successful
Build and Deploy / deploy (push) Successful in 10s
ci: fix kubeconfig path for kubectl
2026-09-21 22:29:06 +00:00

32 lines
867 B
YAML

name: Build and Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: self-hosted
env:
KUBECONFIG: /home/opc/.kube/config
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build image
run: |
docker build \
-t git.ch4t.buzz/djg/bestdadjokes:${{ github.sha }} \
-t git.ch4t.buzz/djg/bestdadjokes:latest \
.
- name: Push to registry
run: |
docker push git.ch4t.buzz/djg/bestdadjokes:${{ github.sha }}
docker push git.ch4t.buzz/djg/bestdadjokes:latest
- name: Roll out to k8s
run: |
kubectl set image deployment/static-bdj \
nginx=git.ch4t.buzz/djg/bestdadjokes:${{ github.sha }} \
-n default
kubectl rollout status deployment/static-bdj -n default --timeout=120s