Skip to content

Latest commit

 

History

History
190 lines (126 loc) · 3.45 KB

File metadata and controls

190 lines (126 loc) · 3.45 KB

✅ GitHub Actions Setup - Summary

🎯 What Was Created?

1. GitHub Actions Workflow

📄 ../../.github/workflows/deploy.yml

On every push to main:

  • ✅ Run tests (823 tests)
  • ✅ Generate coverage report
  • ✅ Create JSDoc documentation
  • ✅ Production build
  • ✅ FTP upload to IONOS

2. JSDoc Configuration

📄 ../../jsdoc.json

  • TypeScript support via Babel
  • Docdash theme
  • Automatic API documentation

3. NPM Scripts

"test:ci": "Tests with Coverage (Headless)"
"docs": "Generate JSDoc"
"docs:serve": "View JSDoc locally"
"deploy:prepare": "Build everything together"

4. Deployment Guide

📄 DEPLOYMENT-GUIDE.md

  • Complete instructions
  • Troubleshooting
  • FTP setup

🚀 Next Steps

1. Set GitHub Secrets

Go to: https://github.com/KosMaster87/Portfolio/settings/secrets/actions

Create new secrets:

Name: FTP_HOST
Value: ftp.your-ionos-server.de

Name: FTP_USERNAME
Value: pXXXXXXXXX

Name: FTP_PASSWORD
Value: your-ftp-password

Finding IONOS FTP credentials:

  1. Login to ionos.com
  2. Webhosting & Domains
  3. Webspace → FTP credentials

2. Install Dependencies

npm install

(Already done: jsdoc, docdash, babel)


3. Testing

# Run tests locally
npm test

# With coverage
npm run test:ci

# Generate JSDoc
npm run docs

# View JSDoc
npm run docs:serve
# Open: http://localhost:8081

4. Commit & Push

git add .
git commit -m "Add GitHub Actions deployment pipeline"
git push origin main

GitHub Actions starts automatically!


📊 Result

After successful deployment:

✅ https://portfolio.dev2k.org           # Your portfolio app
✅ https://portfolio.dev2k.org/coverage/index.html # Test coverage report
✅ https://portfolio.dev2k.org/jsdoc/index.html    # API documentation

📁 Deployment Structure on IONOS

/ (Root directory)
├── index.html              # Angular App
├── assets/
├── *.js, *.css
├── .htaccess              # Auto-generated
├── coverage/
│   └── index.html         # Coverage Report
└── jsdoc/
    └── index.html         # API Docs

🔍 Monitor Workflow

After push:

  1. GitHubActions Tab
  2. Click on current workflow run
  3. View progress in real-time

Pipeline takes approx. 3-5 minutes


⚙️ Important Files

File Purpose
../../.github/workflows/deploy.yml Deployment pipeline
../../jsdoc.json JSDoc configuration
./DEPLOYMENT-GUIDE.md Complete guide
../../.gitignore Ignores docs/, coverage/, deploy/

🐛 If Something Goes Wrong

See: DEPLOYMENT-GUIDE.md → Troubleshooting

Most common errors:

  1. Wrong FTP secrets → Check GitHub Secrets
  2. Tests fail → Run npm test locally
  3. Build error → Test npm run build locally

✅ Checklist

Before the first push:

  • GitHub Secrets configured
  • npm install executed
  • npm test passes
  • npm run docs works
  • FTP credentials tested
  • Domain points to IONOS

All set! 🚀

Just push to main and GitHub Actions handles the rest!