32 lines
769 B
YAML
32 lines
769 B
YAML
name: Deploy Backend
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: linux
|
|
defaults:
|
|
run:
|
|
working-directory: /home/app/saude/entity
|
|
|
|
steps:
|
|
- name: Install SSH
|
|
run: |
|
|
if command -v apk >/dev/null; then
|
|
apk add --no-cache openssh-client
|
|
elif command -v apt-get >/dev/null; then
|
|
apt-get update && apt-get install -y openssh-client
|
|
fi
|
|
|
|
- name: Pull latest source from main
|
|
run: |
|
|
git fetch origin
|
|
git reset --hard origin/main
|
|
|
|
- name: Build
|
|
run: |
|
|
npm run build
|