Skip to content

Commit 84f9acf

Browse files
authored
(ADD) GitHub Actions workflow for deployment
1 parent cfe20d6 commit 84f9acf

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: 🚀 Deploy website on push
2+
3+
on:
4+
push:
5+
branches:
6+
- main # déploie à chaque push sur la branche main
7+
8+
jobs:
9+
web-deploy:
10+
name: 🎉 Deploy to Infomaniak
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: 📦 Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: ⚙️ Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: 18 # ou 20 si ton projet utilise une version plus récente
21+
22+
- name: 📥 Install dependencies
23+
run: npm ci
24+
25+
- name: 🏗️ Build project
26+
run: npm run build
27+
28+
- name: 📂 Deploy to Infomaniak via FTP
29+
uses: SamKirkland/FTP-Deploy-Action@v4.3.6
30+
with:
31+
server: 8r863e.ftp.infomaniak.com # ton vrai hôte FTP
32+
username: ${{ secrets.FTP_USERNAME }}
33+
password: ${{ secrets.FTP_PASSWORD }}
34+
protocol: ftps
35+
local-dir: dist/ # dossier local généré par Vite
36+
server-dir: /sites/damienderyck.com/dist/ # dossier cible sur Infomaniak
37+
log-level: minimal

0 commit comments

Comments
 (0)