Skip to content

fix: dockerfile

fix: dockerfile #26

Workflow file for this run

name: Build and deploy the docs
permissions:
contents: read
packages: write
on:
push:
branches: ["main"]
workflow_dispatch:
concurrency:
group: blokmap-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 }}
port: ${{ secrets.PRODUCTION_SSH_PORT }}
key: ${{ secrets.PRODUCTION_SSH_KEY }}
debug: true
script: |
set -e
cd /home/blokmap/repos/deploy && git pull
docker compose -f /home/blokmap/repos/deploy/production/compose/compose.production.yaml pull blokmap-docs
docker compose -f /home/blokmap/repos/deploy/production/compose/compose.production.yaml up blokmap-docs