From 464e6765a91909bb5dfeff8d4ae7c5000a9b3dcc Mon Sep 17 00:00:00 2001 From: Leander Furumo Date: Sat, 31 Oct 2026 03:32:07 +0100 Subject: [PATCH] add workflow to publish statutes to web server Co-Authored-By: Claude Opus 5.5 --- .github/workflows/publiser-vedtekter.yml | 35 ++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/publiser-vedtekter.yml diff --git a/.github/workflows/publiser-vedtekter.yml b/.github/workflows/publiser-vedtekter.yml new file mode 100644 index 0000000..5e25432 --- /dev/null +++ b/.github/workflows/publiser-vedtekter.yml @@ -0,0 +1,35 @@ +name: Publiser vedtekter + +on: + push: + branches: + - main + paths: + - "styrende dokumenter/vedtekter/gjeldende/**" + workflow_dispatch: + +# Never run two deploys of this repo at the same time +concurrency: deploy + +jobs: + deploy: + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - name: Set up SSH + run: | + install -m 600 -D /dev/null ~/.ssh/id_ed25519 + echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519 + ssh-keyscan -H ${{ vars.SSH_HOST }} > ~/.ssh/known_hosts + + # The deploy key can only run /usr/local/bin/uiogaming-deploy on the server. The vedtekter + # target copies the current statutes to /var/www/uiogaming.no/vedtekter as vedtekter.pdf and + # statutes.pdf (see drift/driftsdokumentasjon.md). + - name: Deploy + run: ssh ${{ secrets.SSH_USER }}@${{ vars.SSH_HOST }} vedtekter + + - name: Clean up + if: always() + run: rm -rf ~/.ssh