Skip to content

fix: use new frontend docker workflow #16

fix: use new frontend docker workflow

fix: use new frontend docker workflow #16

Workflow file for this run

name: Build and deploy the docs
permissions:
contents: read
packages: write
on:
push:
branches: ["main"]
workflow_dispatch:
concurrency:
group: docs
cancel-in-progress: true
jobs:
build:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Load docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/blokmap/blokmap-docs
tags: |
type=raw,value={{sha}}
type=raw,value=latest
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v6
with:
file: Dockerfile.prod
push: true
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=registry,ref=ghcr.io/blokmap/blokmap-docs:buildcache
cache-to: type=registry,ref=ghcr.io/blokmap/blokmap-docs:buildcache,mode=max
# release:
# runs-on: self-hosted
# needs: [build]
# steps:
# - name: Deploy docs
# uses: appleboy/ssh-action@v1.2.1
# with:
# host: ${{ secrets.PRODUCTION_HOST }}
# username: ${{ secrets.PRODUCTION_USERNAME }}
# key: ${{ secrets.PRODUCTION_SSH_KEY }}
# debug: true
# script: |
# set -e
# docker compose -f /home/blokmap/deploy/production/compose.prod.yaml pull
# docker compose -f /home/blokmap/deploy/production/compose.prod.yaml up blokmap-prod-docs