31 lines
642 B
YAML
31 lines
642 B
YAML
name: Deploy API-Ubigeo
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: self-hosted
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Copy source to server
|
|
run: |
|
|
rsync -av --delete \
|
|
--exclude='.git' \
|
|
--exclude='node_modules' \
|
|
--exclude='dist' \
|
|
--exclude='.env' \
|
|
. /home/deployer/api-ubigeo/
|
|
|
|
- name: Build & deploy
|
|
run: bash /home/deployer/deploy-ubigeo.sh
|
|
|
|
- name: Health check
|
|
run: |
|
|
sleep 10
|
|
curl -f https://api-ubigeo.darkcodex.dev/api/v1/health || exit 1
|