Full Gitea Actions CI/CD with cPanel git deployment
CI - Test & Lint / lint (push) Failing after 1m11s
CI - Test & Lint / test-schema (push) Failing after 8s
🚀 Deploy to cPanel via Git / ci-check (push) Failing after 8s
🚀 Deploy to cPanel via Git / deploy-to-cpanel (push) Has been skipped
🚀 Deploy to cPanel via Git / deploy-fallback (push) Has been skipped
🚀 Deploy to cPanel via Git / verify (push) Has been skipped
🌊 Sync cPanel Git + WordPress / sync-cpanel (push) Failing after 9s
CI - Test & Lint / security (push) Successful in 1m42s
🌊 Sync cPanel Git + WordPress / sync-nextcloud (push) Failing after 10s
CI - Test & Lint / lint (push) Failing after 1m11s
CI - Test & Lint / test-schema (push) Failing after 8s
🚀 Deploy to cPanel via Git / ci-check (push) Failing after 8s
🚀 Deploy to cPanel via Git / deploy-to-cpanel (push) Has been skipped
🚀 Deploy to cPanel via Git / deploy-fallback (push) Has been skipped
🚀 Deploy to cPanel via Git / verify (push) Has been skipped
🌊 Sync cPanel Git + WordPress / sync-cpanel (push) Failing after 9s
CI - Test & Lint / security (push) Successful in 1m42s
🌊 Sync cPanel Git + WordPress / sync-nextcloud (push) Failing after 10s
- CI workflow: PHP lint, security scan, schema validation - Deploy workflow: SSH -> cPanel git push + WP REST API fallback + verify - Sync workflow: cPanel sync + Nextcloud artifact upload - Health workflow: every 30min plugin health check - Scripts: verify-deploy, deploy-report, check-namespace, health-check, setup-secrets - README with full architecture documentation - Gitea Actions runner registered on Docker Swarm (contabo-swarm-runner)
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
name: 🌊 Sync cPanel Git + WordPress
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
schedule:
|
||||
- cron: '0 */6 * * *' # Every 6 hours: ensure cPanel is in sync
|
||||
|
||||
jobs:
|
||||
sync-cpanel:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Sync to cPanel Git
|
||||
env:
|
||||
CPANEL_GIT_REMOTE: ${{ secrets.CPANEL_GIT_REMOTE }}
|
||||
CPANEL_SSH_KEY: ${{ secrets.CPANEL_SSH_KEY }}
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "$CPANEL_SSH_KEY" > ~/.ssh/id_rsa
|
||||
chmod 600 ~/.ssh/id_rsa
|
||||
ssh-keyscan -H "${{ secrets.CPANEL_HOST }}" >> ~/.ssh/known_hosts 2>/dev/null
|
||||
|
||||
git remote add cpanel "$CPANEL_GIT_REMOTE"
|
||||
git push cpanel main --force
|
||||
echo "✅ Synced to cPanel git"
|
||||
|
||||
sync-nextcloud:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build plugin for Nextcloud sync
|
||||
run: |
|
||||
mkdir -p build
|
||||
zip -r hermes-cpanel-agent.zip hermes-ai-bridge.php includes assets
|
||||
|
||||
- name: Upload to Nextcloud
|
||||
env:
|
||||
NC_URL: "https://team.falahos.my"
|
||||
NC_USER: "hermes"
|
||||
NC_PASS: ${{ secrets.NEXTCLOUD_HERMES_PASS }}
|
||||
run: |
|
||||
# Upload plugin zip to Nextcloud team folder
|
||||
curl -s -u "$NC_USER:$NC_PASS" \
|
||||
-T hermes-cpanel-agent.zip \
|
||||
"$NC_URL/remote.php/dav/files/hermes/Agent%20Artifacts/hermes-cpanel-agent.zip"
|
||||
echo "✅ Uploaded to Nextcloud"
|
||||
Reference in New Issue
Block a user