Server Deploy / deploy (push) Successful in 2m56s
The lock is a courtesy — the API answers 409 either way. NEXT_PUBLIC_HQ_URL defaults empty so a self-hosted install shows a plain label rather than a link to a portal that does not serve them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
75 lines
3.1 KiB
YAML
75 lines
3.1 KiB
YAML
name: Server Deploy
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-docker
|
|
container: docker:dind
|
|
steps:
|
|
- name: Setup Node
|
|
run: apk add --update nodejs npm
|
|
- 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
|
|
|
|
- name: Build and push server image
|
|
run: |
|
|
IMAGE="${{ vars.DOCKER_HOST }}/${{ github.repository_owner }}/vantage/server:latest"
|
|
# Root context: server depends on the shared module.
|
|
docker build -t "$IMAGE" -f server/Dockerfile .
|
|
docker push "$IMAGE"
|
|
|
|
- name: Build and push web image
|
|
run: |
|
|
IMAGE="${{ vars.DOCKER_HOST }}/${{ github.repository_owner }}/vantage/web:latest"
|
|
docker build \
|
|
--build-arg NEXT_PUBLIC_API_URL="${{ vars.API_URL }}" \
|
|
--build-arg NEXT_PUBLIC_HQ_URL="${{ vars.HQ_URL }}" \
|
|
-t "$IMAGE" \
|
|
-f web/Dockerfile web/
|
|
docker push "$IMAGE"
|
|
|
|
- name: Build and push site image
|
|
run: |
|
|
IMAGE="${{ vars.DOCKER_HOST }}/${{ github.repository_owner }}/vantage/site:latest"
|
|
docker build \
|
|
--build-arg NEXT_PUBLIC_SITE_API="${{ vars.SITE_API_URL }}" \
|
|
--build-arg NEXT_PUBLIC_CONTACT_EMAIL="support@hostxtra.co.uk" \
|
|
--build-arg NEXT_PUBLIC_ADMIN_API_URL="${{ vars.ADMIN_API_URL }}" \
|
|
-t "$IMAGE" \
|
|
-f site/Dockerfile site/
|
|
docker push "$IMAGE"
|
|
|
|
- name: Build and push sitesvc image
|
|
run: |
|
|
IMAGE="${{ vars.DOCKER_HOST }}/${{ github.repository_owner }}/vantage/sitesvc:latest"
|
|
# Root context: sitesvc depends on the shared module.
|
|
docker build -t "$IMAGE" -f sitesvc/Dockerfile .
|
|
docker push "$IMAGE"
|
|
|
|
- name: Build and push admin image
|
|
run: |
|
|
IMAGE="${{ vars.DOCKER_HOST }}/${{ github.repository_owner }}/vantage/admin:latest"
|
|
# Root context: admin depends on the shared module.
|
|
docker build -t "$IMAGE" -f admin/Dockerfile .
|
|
docker push "$IMAGE"
|
|
|
|
- name: Build and push adminsite image
|
|
run: |
|
|
IMAGE="${{ vars.DOCKER_HOST }}/${{ github.repository_owner }}/vantage/adminsite:latest"
|
|
docker build \
|
|
--build-arg NEXT_PUBLIC_ADMIN_API_URL="${{ vars.ADMIN_API_URL }}" \
|
|
--build-arg NEXT_PUBLIC_ADMIN_ENV="${{ vars.ADMIN_ENV }}" \
|
|
-t "$IMAGE" \
|
|
-f adminsite/Dockerfile adminsite/
|
|
docker push "$IMAGE"
|