Skip to content

Commit

Permalink
[ci/cd]: add Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
cupoftea4 committed Oct 13, 2024
1 parent 7adcab2 commit 66318ec
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Deploy to FTP Server

on:
push:
branches:
- develop

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
run: npm install

- name: Build project
run: npm run build

- name: Deploy
uses: SamKirkland/FTP-Deploy-Action@4.3.1
with:
server: '${{ secrets.FTP_SERVER }}'
username: '${{ secrets.DEV_FTP_USERNAME }}'
password: '${{ secrets.DEV_FTP_PASSWORD }}'
local-dir: ./build/
server-dir: /
34 changes: 34 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Deploy to FTP Server

on:
push:
branches:
- master

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
run: npm install

- name: Build project
run: npm run build

- name: Deploy
uses: SamKirkland/FTP-Deploy-Action@4.3.1
with:
server: '${{ secrets.FTP_SERVER }}'
username: '${{ secrets.FTP_USERNAME }}'
password: '${{ secrets.FTP_PASSWORD }}'
local-dir: ./build/
server-dir: /

0 comments on commit 66318ec

Please sign in to comment.