diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml index 2a16214..236ad0b 100644 --- a/.forgejo/workflows/build.yaml +++ b/.forgejo/workflows/build.yaml @@ -1,8 +1,8 @@ -on: +on: workflow_dispatch: push: branches: [main] - + jobs: build: runs-on: self-hosted @@ -12,5 +12,5 @@ jobs: - run: npm ci - run: npm run build - run: mkdir -p /data/nycki.net/site - - run: cp site.conf /data/nycki.net/site.conf + - run: cp tools/site.conf /data/nycki.net/site.conf - run: cp -r _site/* /home/nycki/nycki.net/patches/* /data/nycki.net/site/ diff --git a/tools/forgejo-runner.service b/tools/forgejo-runner.service new file mode 100644 index 0000000..14676a9 --- /dev/null +++ b/tools/forgejo-runner.service @@ -0,0 +1,18 @@ +[Unit] +Description=Forgejo Runner +Documentation=https://forgejo.org/docs/latest/admin/actions/ +After=docker.service + +[Service] +ExecStart=forgejo-runner daemon +ExecReload=/bin/kill -s HUP $MAINPID + +# This user and working directory must already exist +User=nycki-forgejo +WorkingDirectory=/opt/nycki-forgejo +Restart=on-failure +TimeoutSec=0 +RestartSec=10 + +[Install] +WantedBy=multi-user.target diff --git a/site.conf b/tools/site.conf similarity index 100% rename from site.conf rename to tools/site.conf