This commit is contained in:
@@ -9,27 +9,34 @@ jobs:
|
|||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Sync repo
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Sync server repo
|
||||||
run: |
|
run: |
|
||||||
|
set -e
|
||||||
|
echo "::group::Sync"
|
||||||
cd /home/chpark
|
cd /home/chpark
|
||||||
if [ ! -d insurance/.git ]; then
|
if [ ! -d insurance/.git ]; then
|
||||||
git clone https://git.junggomoa.com/chpark/insurance.git
|
git clone https://git.junggomoa.com/chpark/insurance.git
|
||||||
fi
|
fi
|
||||||
cd insurance
|
cd insurance
|
||||||
git fetch origin
|
git fetch origin master
|
||||||
git reset --hard "origin/${GITHUB_REF##*/}"
|
git reset --hard origin/master
|
||||||
|
git log -1 --oneline
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
- name: Deploy to k3s
|
- name: Deploy to k3s
|
||||||
run: |
|
run: |
|
||||||
|
set -e
|
||||||
cd /home/chpark/insurance
|
cd /home/chpark/insurance
|
||||||
chmod +x scripts/deploy-remote.sh
|
chmod +x scripts/deploy-remote.sh
|
||||||
bash scripts/deploy-remote.sh
|
bash scripts/deploy-remote.sh
|
||||||
|
|
||||||
- name: Show status
|
- name: Status
|
||||||
if: always()
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
export KUBECONFIG=/home/chpark/.kube/config
|
export KUBECONFIG=/home/chpark/.kube/config
|
||||||
kubectl -n insurance get pods,svc 2>&1 || true
|
kubectl -n insurance get pods,svc 2>&1 || true
|
||||||
echo ""
|
echo "Web: https://insurance.junggomoa.com"
|
||||||
echo "🚀 Web: https://insurance.junggomoa.com"
|
echo "API: https://api.insurance.junggomoa.com"
|
||||||
echo "🔌 API: https://api.insurance.junggomoa.com"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user