feat: configure CI/CD with Forgejo Actions
Some checks failed
Deploy / Build and Deploy to Production (push) Failing after 26s
Some checks failed
Deploy / Build and Deploy to Production (push) Failing after 26s
- Add Forgejo workflow for automated build and deploy - Build creates dist/ from public/ then adds Vue app build - Configure Vite to build to dist/assets/dist with fixed filenames - Deploy entire dist/ directory to production via FTP - Add workflow documentation with FTP setup instructions The workflow mirrors the GitLab CI approach: dist/ is created during build and synchronized to production root on every push to main. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
5fb9cf68a3
commit
052c6958f3
3 changed files with 127 additions and 0 deletions
43
.forgejo/workflows/README.md
Normal file
43
.forgejo/workflows/README.md
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
# CI/CD avec Forgejo
|
||||
|
||||
## Vue d'ensemble
|
||||
|
||||
Le workflow `deploy.yml` automatise le build de l'application Vue et le déploiement sur le serveur de production.
|
||||
|
||||
## Workflow
|
||||
|
||||
À chaque push sur la branche `main` :
|
||||
|
||||
1. **Checkout** : Clone le dépôt
|
||||
2. **Setup Node.js** : Installe Node.js 20
|
||||
3. **Install dependencies** : Installe les dépendances npm
|
||||
4. **Build Vue app** : Compile l'application Vue vers `public/assets/dist/`
|
||||
5. **Deploy via FTP** : Synchronise les fichiers vers le serveur de production
|
||||
|
||||
## Configuration des secrets
|
||||
|
||||
Dans Forgejo, configurez les secrets suivants (Settings > Secrets and Variables > Actions) :
|
||||
|
||||
- `USERNAME` : Nom d'utilisateur FTP
|
||||
- `PASSWORD` : Mot de passe FTP
|
||||
- `PRODUCTION_HOST` : Hôte FTP (format : `ftp://host.example.com`)
|
||||
|
||||
## Fichiers déployés
|
||||
|
||||
Le workflow déploie depuis le dossier `public/` :
|
||||
|
||||
- `public/assets/` → `assets/` (incluant le build Vue dans `assets/dist/`)
|
||||
- `public/site/` → `site/` (excluant accounts/, cache/, sessions/)
|
||||
- `public/kirby/` → `kirby/`
|
||||
- `public/vendor/` → `vendor/`
|
||||
- `public/index.php` → `index.php`
|
||||
|
||||
## Build local
|
||||
|
||||
Pour tester le build localement :
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
Les fichiers seront générés dans `public/assets/dist/` (ignorés par git).
|
||||
Loading…
Add table
Add a link
Reference in a new issue