🚀 Deploy API to OVH VPS #106
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: 🚀 Deploy api to o2switch | |
on: | |
push: | |
branches: [ 'main' ] | |
pull_request: | |
branches: [ 'main' ] | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🚚 Get latest code | |
uses: actions/checkout@v3 | |
- name: 🚀 Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16.x' | |
- name: 🔍 Install dependencies | |
run: cd api && npm install | |
- name: 🧱 Build application | |
run: cd api && npm run build | |
- name: 🛁 Clean install a project | |
run: cd api/build && npm ci --production | |
- name: 📂 Sync files | |
uses: SamKirkland/FTP-Deploy-Action@v4.3.4 | |
with: | |
server: ${{ secrets.FTP_SERVER }} | |
username: ${{ secrets.FTP_USERNAME }} | |
password: ${{ secrets.FTP_PASSWORD }} | |
port: 21 | |
protocol: ftp | |
local-dir: ./api/build/ | |
server-dir: aparteasy.api.dibodev.com/ |