GitHub Actions Setup Guide
This repository uses GitHub Actions to automatically build and deploy the site daily.
What it does
- Runs daily at 6 AM UTC (7 AM CET / 8 AM CEST)
- Fetches fresh event data from the Brussels API
- Builds the Eleventy site
- Deploys to your OVH server via FTP
Setup Instructions
1. Push this repository to GitHub
If you haven't already:
# Initialize git (if not already done)
git init
# Add all files
git add .
# Commit
git commit -m "Initial commit with GitHub Actions"
# Create a new repository on GitHub, then:
git remote add origin https://github.com/YOUR-USERNAME/YOUR-REPO-NAME.git
git branch -M main
git push -u origin main
2. Add FTP Credentials as Secrets
Go to your GitHub repository settings:
-
Click Settings → Secrets and variables → Actions
-
Click New repository secret
-
Add these three secrets:
-
Name: FTP_HOST
- Value: Your OVH FTP server address (e.g.,
ftp.yoursite.com or ftp.cluster123.hosting.ovh.net)
-
Name: FTP_USER
- Value: Your FTP username (e.g.,
multile)
-
Name: FTP_PASSWORD
3. Configure the Deployment Path
Edit .github/workflows/daily-deploy.yml if needed:
server-dir: Change ./ to your specific directory on the server (e.g., ./public_html/ or ./www/)
cron: Adjust the time if you want a different schedule
- Format:
'minute hour day month weekday'
- Example:
'0 6 * * *' = 6 AM UTC daily
- Use crontab.guru to help
4. Test the Workflow
- Go to Actions tab in your GitHub repository
- Click Daily Build and Deploy workflow
- Click Run workflow → Run workflow (manual trigger)
- Watch it run and check for any errors
5. Monitor Daily Runs
- Check the Actions tab to see daily build logs
- You'll get email notifications if a build fails
- The workflow will run automatically every day at the scheduled time
Troubleshooting
Build fails with "npm ci" error
- Make sure
package-lock.json is committed to the repository
FTP deployment fails
- Double-check your FTP credentials in Secrets
- Verify the
server-dir path is correct
- Check if your OVH hosting allows FTP connections from GitHub's IP ranges
Events not updating
- Check the Actions log to see if the API call succeeded
- Verify the build completed successfully
- Check if files were actually uploaded to the server
Manual Deployment
You can still deploy manually anytime:
npm run build
# Then upload _site/ folder via FTP as usual
Disable Automatic Deployment
To temporarily disable:
- Go to Actions → Daily Build and Deploy
- Click the ... menu → Disable workflow
Cost
- Free for public repositories (unlimited minutes)
- Free for private repositories (2,000 minutes/month - you'll use ~150 minutes/month)