Merge pull request 'Publish straight to the bucket' (#1) from claude/static-publish into master
CI / build (push) Successful in 15s

This commit was merged in pull request #1.
This commit is contained in:
mtps committed 2026-11-09 13:07:40 +01:00
commit b8dccdd82f
2 files changed
+8 -55

No files matched your search

+8 -23
View File
@@ -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 }}
-32
View File
@@ -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