diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 62f421c5..bb7136c8 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -10,6 +10,7 @@ env: # Docker & Registries ARCHITECTURES: linux/amd64,linux/arm64 IMAGE_NAME: silverbullet + WEBSITE_IMAGE_NAME: silverbullet NAMESPACE_GITHUB: silverbulletmd NAMESPACE_DOCKER: zefhemel jobs: @@ -76,3 +77,25 @@ jobs: labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max + + - name: "Website: Extract metadata (tags, labels) for docker" + id: website_meta + uses: docker/metadata-action@v4.4.0 + with: + images: | + ${{ env.NAMESPACE_DOCKER }}/${{ env.WEBSITE_IMAGE_NAME }} + tags: | + type=edge,branch=main + + - name: "Website: Build and push website docker images" + uses: docker/build-push-action@v4.0.0 + with: + context: . + file: Dockerfile.website + platforms: ${{ env.ARCHITECTURES }} + push: true + provenance: false + tags: ${{ steps.website_meta.outputs.tags }} + labels: ${{ steps.website_meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max diff --git a/Dockerfile.website b/Dockerfile.website new file mode 100644 index 00000000..9e367027 --- /dev/null +++ b/Dockerfile.website @@ -0,0 +1,8 @@ +FROM zefhemel/silverbullet:v2 + +# Set some environment variables +ENV SB_INDEX_PAGE=SilverBullet +ENV SB_READ_ONLY=1 + +# Add the website content +ADD website /space diff --git a/website/CONTAINER_BOOT.md b/website/CONTAINER_BOOT.md index 5a9a5703..14f0a73d 100644 --- a/website/CONTAINER_BOOT.md +++ b/website/CONTAINER_BOOT.md @@ -1,5 +1,7 @@ -# Update the repos -apt update +Uncomment the lines to actually run them. -# Install additional packages -apt install -y pandoc +## Update the repos +#apt update + +## Install additional packages +#apt install -y pandoc