Merge pull request 'Publish straight to the bucket' (#1) from claude/static-publish into master
CI / build (push) Successful in 26s
CI / build (push) Successful in 26s
This commit was merged in pull request #1.
This commit is contained in:
commit
d90786286e
2 files changed
+9
-59
No files matched your search
@@ -1,6 +1,6 @@
|
||||
name: Release
|
||||
|
||||
# v1.2.3 -> production build, release, deploy/static.yml (www.mtps.pl)
|
||||
# v1.2.3 -> production build, release, publish to www.mtps.pl
|
||||
on:
|
||||
push:
|
||||
tags: ['v*']
|
||||
@@ -8,8 +8,6 @@ on:
|
||||
jobs:
|
||||
release:
|
||||
runs-on: rocky-10
|
||||
outputs:
|
||||
version: ${{ steps.meta.outputs.version }}
|
||||
steps:
|
||||
- name: Check out source
|
||||
uses: actions/checkout@v4
|
||||
@@ -61,24 +59,12 @@ jobs:
|
||||
${{ gitea.event.repository.name }}-*.tgz
|
||||
${{ gitea.event.repository.name }}-*.tgz.sha256
|
||||
|
||||
# static-server on kara downloads the release asset, so this runs after it
|
||||
deploy:
|
||||
needs: release
|
||||
runs-on: rocky-10
|
||||
# never run two deploys at once
|
||||
concurrency:
|
||||
group: deploy-${{ gitea.repository }}
|
||||
cancel-in-progress: false
|
||||
steps:
|
||||
- name: Check out source
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- 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/homepage.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: |
|
||||
static_release=${{ needs.release.outputs.version }}
|
||||
ssh-key: ${{ secrets.DEPLOY_SSH_KEY }}
|
||||
known-hosts: ${{ vars.DEPLOY_KNOWN_HOSTS }}
|
||||
path: build
|
||||
bucket: www.mtps.pl
|
||||
access-key-id: ${{ secrets.STATIC_ACCESS_KEY_ID }}
|
||||
secret-access-key: ${{ secrets.STATIC_SECRET_ACCESS_KEY }}
|
||||
@@ -1,36 +0,0 @@
|
||||
---
|
||||
# Static site: https://git.app.ygg/mtps/homepage
|
||||
#
|
||||
# Deployed by .gitea/workflows/release.yml through ygg/actions/deploy
|
||||
# (deploy/static playbook on kara).
|
||||
#
|
||||
# static_release is passed by the release workflow (-e static_release=1.2.3).
|
||||
# For a manual run pass it the same way, there's deliberately no default here.
|
||||
# Release assets are versioned (homepage-<version>.tgz), and static-server only
|
||||
# auto-detects *.tar.gz, so the asset is named explicitly.
|
||||
|
||||
static_stack_name: homepage
|
||||
|
||||
domain: www.mtps.pl
|
||||
# /etc/nginx/certs/<cert>.conf on the nginx host
|
||||
cert: mtps.pl
|
||||
|
||||
# static_service replaces the role default as a whole, so every key is required
|
||||
static_service:
|
||||
name: static
|
||||
image: "{{ gitea_host }}/ygg/static-server:latest"
|
||||
environment:
|
||||
GITEA_REPOSITORY_URL: "https://{{ gitea_host }}/mtps/homepage"
|
||||
GITEA_RELEASE: "v{{ static_release }}"
|
||||
GITEA_ASSET_NAME: "homepage-{{ static_release }}.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: 11903
|
||||
protocol: tcp
|
||||
mode: ingress
|
||||
replicas: 3
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
Reference in new issue
Block a user