-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (58 loc) · 1.86 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Deploy
on:
push:
branches:
- main
jobs:
prepare-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 8
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm run build
- name: Build Docker image
run: docker build -t team-starter-nextjs:latest .
- name: Run Docker container
run: docker run -d -p 3000:3000 team-starter-nextjs:latest
- name: Placeholder for future deployment steps
run: |
echo "Deployment steps will be added here in the future."
echo "For now, this is just a placeholder to ensure the workflow runs without errors."
# Exemple de déploiement sur Netlify
# - name: Deploy to Netlify
# uses: nwtgck/actions-netlify@v2.0
# with:
# publish-dir: './out'
# production-branch: main
# github-token: ${{ secrets.GITHUB_TOKEN }}
# deploy-message: "Deploy from GitHub Actions"
# env:
# NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
# NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
# Exemple de déploiement sur Vercel
# - name: Deploy to Vercel
# uses: amondnet/vercel-action@v20
# with:
# vercel-token: ${{ secrets.VERCEL_TOKEN }}
# vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
# vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
# working-directory: ./
# Exemple de déploiement sur Heroku
# - name: Deploy to Heroku
# uses: akhileshns/heroku-deploy@v3.12.14
# with:
# heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
# heroku_app_name: "your-app-name"
# heroku_email: "your-email@example.com"
# buildpack: "heroku/nodejs"