-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 985 Bytes
/
deploy-api.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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/app/