Skip to content

Commit 3f2d390

Browse files
committed
chore(workflow): setup workflow for deployment
1 parent 566102c commit 3f2d390

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: 🚀 Deploy React App to Hostinger via FTP
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: ⬇️ Checkout repository
14+
uses: actions/checkout@v3
15+
16+
- name: 🛠 Setup Node.js
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: '18'
20+
21+
- name: 📦 Install dependencies
22+
run: npm install
23+
24+
- name: 🏗 Build project
25+
run: npm run build
26+
27+
- name: 🚀 Deploy to Hostinger via FTP
28+
uses: SamKirkland/[email protected]
29+
with:
30+
server: ${{ secrets.FTP_HOST }}
31+
username: ${{ secrets.FTP_USERNAME }}
32+
password: ${{ secrets.FTP_PASSWORD }}
33+
local-dir: build/
34+
server-dir: ${{ secrets.FTP_TARGET_DIR }}/

0 commit comments

Comments
 (0)