From 9533392c81e4f6038a4c7a3ba36b82fe6318108a Mon Sep 17 00:00:00 2001 From: Mateusz Pstrucha Date: Sun, 8 Nov 2026 15:13:05 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80=20publish=20straight=20to=20the=20?= =?UTF-8?q?bucket?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The release builds and uploads with ygg/actions/static-publish, instead of deploying static-server through kara. Co-Authored-By: Claude Opus 5.5 --- .gitea/workflows/release.yml | 31 ++++++++----------------------- deploy/static.yml | 32 -------------------------------- 2 files changed, 8 insertions(+), 55 deletions(-) delete mode 100644 deploy/static.yml diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index c632138..532dd62 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -49,27 +49,12 @@ jobs: tern-web-*.tgz tern-web-*.tgz.sha256 - # Deploys the release just published to tern.mtps.pl (deploy/static on - # the swarm; see deploy/static.yml). - deploy: - needs: release - runs-on: rocky-10 - steps: - - name: Check out source - uses: actions/checkout@v4 - - - name: Derive version - id: version - env: - TAG: ${{ gitea.ref_name }} - run: echo "version=${TAG#v}" >> "$GITHUB_OUTPUT" - - - name: Deploy - uses: https://git.app.ygg/ygg/actions/deploy@v2 + # Straight to the bucket, with a key that only reaches it. The bucket and + # the nginx site come from deployments/tern-web.yml in ygg/deployments. + - name: Publish + uses: https://git.app.ygg/ygg/actions/static-publish@v2 with: - type: static - dist-path: deploy/static.yml - extra-vars: | - version=${{ steps.version.outputs.version }} - ssh-key: ${{ secrets.DEPLOY_SSH_KEY }} - known-hosts: ${{ secrets.DEPLOY_KNOWN_HOSTS }} + path: dist + bucket: tern.mtps.pl + access-key-id: ${{ secrets.STATIC_ACCESS_KEY_ID }} + secret-access-key: ${{ secrets.STATIC_SECRET_ACCESS_KEY }} diff --git a/deploy/static.yml b/deploy/static.yml deleted file mode 100644 index 6df4ee3..0000000 --- a/deploy/static.yml +++ /dev/null @@ -1,32 +0,0 @@ -# tern-web's deployment: a Swarm stack of ygg/static-server serving this -# version's release asset, on tern.mtps.pl (deploy/static in the ygg -# management repo). Run by this repo's release workflow through -# ygg/actions/deploy; `version` arrives as an extra var (the tag without -# its v) and is templated in by Ansible. -# -# The webapp talks to tern-server at tern-api.mtps.pl, baked in at build -# time (VITE_TERN_API in the release workflow). - -static_stack_name: tern-web - -domain: tern.mtps.pl -cert: mtps.pl - -static_service: - name: static - image: git.app.ygg/ygg/static-server:latest - environment: - GITEA_REPOSITORY_URL: https://git.app.ygg/mtps/tern-web - GITEA_RELEASE: "v{{ version }}" - GITEA_ASSET_NAME: "tern-web-{{ version }}.tgz" - SSL_CERT_FILE: /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem - volumes: - - /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem:/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem:ro - ports: - - target: 8080 - published: 11902 - protocol: tcp - mode: ingress - replicas: 2 - restart_policy: - condition: on-failure -- 2.54.0