Updated client dependencies & tsconfig file #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deployment on "main" branch client folder push | |
on: | |
push: | |
branches: | |
- 'main' | |
paths: | |
- 'client/**' | |
- '!.github/**' | |
- '!**/.gitignore' | |
- '!**/.prettierrc' | |
- '!**/*.md' | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
environment: CI/CD | |
env: | |
VITE_APP_ENV: production | |
VITE_APP_API_URL: ${{ vars.API_URL }} | |
steps: | |
- name: Deploy to production server | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.VPS_HOST }} | |
username: ${{ secrets.VPS_USER }} | |
password: ${{ secrets.VPS_PASSWORD }} | |
envs: VITE_APP_ENV,VITE_APP_API_URL | |
script: | | |
cd /var/www/javascript/privpass-client/privpass/client | |
git pull origin main | |
npm ci | |
echo -e "\ | |
VITE_APP_ENV=$VITE_APP_ENV\n\ | |
VITE_APP_API_URL=$VITE_APP_API_URL\n\ | |
" > .env | |
rm -r build | |
npm run build | |
exit |