eolas-app/.forgejo/workflows/deploy.yaml
thomasabishop d8579876ad
All checks were successful
Deploy eolas-app / deploy (push) Successful in 50s
feat: add frontend env vars to deploy script
2025-11-07 18:19:59 +00:00

21 lines
757 B
YAML

name: Deploy eolas-app
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
container: node:20
steps:
- uses: actions/checkout@v3
- run: npm install
- run: npm run build
env:
VITE_EOLAS_API_ENDPOINT: ${{ vars.EOLAS_API_ENDPOINT }}
VITE_EOLAS_API_KEY: ${{ secrets.EOLAS_API_KEY }}
- run: |
echo "${{ secrets.VPS_DEPLOY_USER_SSH_KEY }}" > /tmp/ssh_key
chmod 600 /tmp/ssh_key
ssh -i /tmp/ssh_key -o StrictHostKeyChecking=no ${{ vars.VPS_DEPLOY_USER }} "bash -c 'cd /var/www/eolas-app && rm -rf * .[^.]*'"
scp -i /tmp/ssh_key -o StrictHostKeyChecking=no -r dist/* ${{ vars.VPS_DEPLOY_USER }}:/var/www/eolas-app/
rm /tmp/ssh_key