Initial commit - WIP

This commit is contained in:
2026-02-18 22:49:54 +01:00
commit bd58cbb1df
5 changed files with 297 additions and 0 deletions

37
test-deployment.mjs Normal file
View File

@@ -0,0 +1,37 @@
import { readFileSync } from 'node:fs';
const json = JSON.parse(readFileSync('test-payload.json'));
if (json.after.match(/^0+$/)) {
// This is test deployment - for now we will simply replace with 'HEAD'
}
console.log(json.after, json.repository.ssh_url);
// git --git-dir=/srv/docker/gitea.efforting.tech/gitea-data/git/repositories/mikael-lovqvist/websperiments.git worktree add /srv/deploy/<repo> <commit-sha>
// /srv/docker/gitea.efforting.tech/gitea-data/git/repositories/mikael-lovqvist/websperiments.git
/*
git clone --mirror /srv/docker/gitea.efforting.tech/gitea-data/git/repositories/mikael-lovqvist/websperiments.git
git --git-dir=/srv/docker/gitea.efforting.tech/gitea-data/git/repositories/mikael-lovqvist/websperiments.git archive refs/heads/main | tar -x -C /srv/http/sites.efforting.tech/mikael-lovqvist/websperiments
ubuntu@vps-a0ce290a:/srv/http/sites.efforting.tech$ sudo -u www-data mkdir -p mikael-lovqvist/websperiments
ubuntu@vps-a0ce290a:/srv/http/sites.efforting.tech$ sudo -u www-data git --git-dir=/srv/docker/gitea.efforting.tech/gitea-data/git/repositories/mikael-lovqvist/websperiments.git archive refs/heads/main | sudo -u www-data tar -x -C /srv/http/sites.efforting.tech/mikael-lovqvist/websperiments
*/