Skip to content

Commit 0bd0e7e

Browse files
committed
Adicionar workflow de deploy para React via FTP
1 parent 2b133ea commit 0bd0e7e

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Deploy React via FTP
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build-and-deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout do código
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Node
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 18
20+
21+
- name: Instalar dependências
22+
run: npm ci
23+
24+
- name: Build do projeto
25+
run: npm run build
26+
27+
- name: Deploy via FTP
28+
uses: SamKirkland/FTP-Deploy-Action@v4.3.5
29+
with:
30+
server: ${{ secrets.FTP_SERVER }}
31+
username: ${{ secrets.FTP_USERNAME }}
32+
password: ${{ secrets.FTP_PASSWORD }}
33+
port: ${{ secrets.FTP_PORT }}
34+
local-dir: dist/
35+
server-dir: ${{ secrets.SERVER_DIR }}

0 commit comments

Comments
 (0)