Compare commits
8 Commits
817e558a6b
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
| 3e9af6738f | |||
| 80a5a5bc55 | |||
| a700becb0d | |||
| 4e85aed098 | |||
| 69680141ff | |||
| 3b3e0e9004 | |||
| 347f49e2af | |||
| fa6dc4e634 |
31
.gitea/workflows/deploy.yml
Normal file
31
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
name: Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set environment
|
||||
id: env
|
||||
run: |
|
||||
if [ "${{ github.ref_name }}" = "main" ]; then
|
||||
echo "ENV=prod" >> $GITHUB_OUTPUT
|
||||
echo "COMPOSE_FILE=docker/docker-compose.prod.yml" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "ENV=dev" >> $GITHUB_OUTPUT
|
||||
echo "COMPOSE_FILE=docker/docker-compose.yml" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Deploy
|
||||
run: |
|
||||
docker compose -f ${{ steps.env.outputs.COMPOSE_FILE }} pull
|
||||
docker compose -f ${{ steps.env.outputs.COMPOSE_FILE }} up -d --remove-orphans
|
||||
docker image prune -f
|
||||
@@ -39,7 +39,7 @@ npm run typecheck # IMPORTANT : lancer après chaque série de modifications
|
||||
- IMPORTANT : ne jamais considérer une tâche terminée sans typecheck qui passe
|
||||
|
||||
## Git
|
||||
- Branches : main (prod) → develop (dev) → feature/xxx
|
||||
- Branches : main (prod) → dev (dev)
|
||||
- Commits : feat: / fix: / docs: / refactor: / chore:
|
||||
- IMPORTANT : toujours créer une nouvelle branche pour chaque tâche
|
||||
- IMPORTANT : ne jamais pusher directement sur main
|
||||
|
||||
13
README.md
13
README.md
@@ -0,0 +1,13 @@
|
||||
# Nom du projet
|
||||
|
||||
## Description
|
||||
[Description du projet]
|
||||
|
||||
## Installation
|
||||
```bash
|
||||
npm install
|
||||
npm run dev
|
||||
```
|
||||
|
||||
## Déploiement
|
||||
Via Gitea Actions → Docker → NAS (rigolet.tech)
|
||||
|
||||
13
docker/docker-compose.yml
Normal file
13
docker/docker-compose.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
app:
|
||||
image: your-app:latest
|
||||
container_name: your-app
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- proxy
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
external: true
|
||||
Reference in New Issue
Block a user