Files
vantage-docs/.gitea/workflows/deploy.yml
T
2026-09-10 09:18:57 +00:00

46 lines
1.8 KiB
YAML

name: Deploy
on:
push:
branches:
- main
# DOCS_URL, DOCS_BASE_URL and APP_URL are repo variables, and editing one
# pushes no commit - so nothing would rebuild on its own. This is the
# escape hatch for that, and DOCS_BASE_URL in particular is baked into
# every asset path in the build.
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-docker
container: docker:dind
steps:
- name: Setup
run: apk add --update nodejs npm git
- name: Checkout
uses: actions/checkout@v4
- name: Log in to registry
run: |
echo "${{ secrets.RELEASE_TOKEN }}" | \
docker login ${{ vars.DOCKER_HOST }} \
-u "${{ secrets.REGISTRY_USER }}" --password-stdin
# One image, one directory - the whole repository is the docs site,
# so there is nothing to detect a change in. It rebuilds on every
# push, which is what a docs site wants anyway.
#
# No build args are passed, deliberately: DOCS_URL, DOCS_BASE_URL,
# APP_URL and HQ_URL all have correct defaults in the Dockerfile,
# and passing an unset repo variable would blank one rather than
# leave it alone. DOCS_BASE_URL in particular must match the proxy
# location that routes here and the directory the runtime stage
# serves from; when those three disagree the HTML loads and every
# asset 404s. Change it in the Dockerfile, not here.
- name: Build and push image
run: |
IMAGE="${{ vars.DOCKER_HOST }}/vantage/vantage-docs:latest"
docker build -t "$IMAGE" .
docker push "$IMAGE"