-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (41 loc) · 1.24 KB
/
deploy.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
42
43
44
45
46
name: DevOps-GitHubActions
on:
workflow_dispatch:
push:
branches:
- main
jobs:
# Build And deploy Job
build-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install Dependencies
run: npm install
- name: Build Project
run: npm run build
env:
VITE_API_URL: ${{vars.VITE_API_URL}}
- name: Fast FTP Action
uses: anvil-solutions/[email protected]
with:
server: ${{ secrets.SERVER_HOST}}
username: ${{ secrets.USERNAME}}
password: ${{ secrets.FTP_PASSWORD }}
local_dir: ./dist
remote_dir: ${{ secrets.DEPLOYMENT_PATHFILE }}
# - name: SSH Deployment
# uses: saranraj3195/sparkout-deployment@v2
# env:
# DEPLOY_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
# ARGS: '-avz --delete'
# SERVER_PORT: ${{ secrets.SERVER_PORT }}
# FOLDER: 'dist/*'
# SERVER_IP: ${{ secrets.SERVER_HOST }}
# USERNAME: ${{ secrets.USERNAME }}
# SERVER_DESTINATION: ${{ secrets.DEPLOYMENT_PATHFILE }}