Files
2026-04-23 01:32:59 +09:00

43 lines
1.1 KiB
YAML

name: Deploy
on:
push:
branches: [master, main]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Sync server repo
run: |
set -e
git config --global --add safe.directory /home/chpark/insurance
cd /home/chpark
if [ ! -d insurance/.git ]; then
git clone https://git.junggomoa.com/chpark/insurance.git
chown -R chpark:chpark insurance
fi
cd insurance
git fetch origin master
git reset --hard origin/master
git log -1 --oneline
- name: Deploy to k3s
run: |
set -e
cd /home/chpark/insurance
chmod +x scripts/deploy-remote.sh
bash scripts/deploy-remote.sh
- name: Status
if: always()
run: |
export KUBECONFIG=/home/chpark/.kube/config
kubectl -n insurance get pods,svc 2>&1 || true
echo "Web: https://insurance.junggomoa.com"
echo "API: https://api.insurance.junggomoa.com"