Skip to content

Add docker conf. fix. #4

Add docker conf. fix.

Add docker conf. fix. #4

Workflow file for this run

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 nextjs14cicd:latest .
- name: Run Docker container
run: docker run -d -p 3000:3000 nextjs14cicd: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"