Skip to content

Commit 87f2548

Browse files
committed
feat: add GitHub Actions workflow for deploying Vue.js app to GitHub Pages
1 parent 5269c14 commit 87f2548

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 Vue.js app to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- vue # Déploie quand tu pousses sur vue
7+
8+
jobs:
9+
build-and-deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 18 # Compatible avec Vue 3/Vite
20+
21+
- name: Install dependencies
22+
run: npm install
23+
24+
- name: Build project
25+
run: npm run build
26+
27+
# ⚙️ Étape spécifique à Vite : si tu utilises Vite, le build est dans "dist/"
28+
# ⚙️ Étape spécifique à Vue CLI : le build est dans "dist/" aussi par défaut
29+
30+
- name: Deploy to GitHub Pages
31+
uses: peaceiris/actions-gh-pages@v4
32+
with:
33+
github_token: ${{ secrets.GITHUB_TOKEN }}
34+
publish_dir: ./dist

0 commit comments

Comments
 (0)