Skip to content

Commit b6486f2

Browse files
authored
Add build pipeline for dev docs (#231)
* Add build pipeline for dev docs * Add watchtower label to compose.yml * Reformat * Update compose.yml image tag to remove "latest"
1 parent 58fc918 commit b6486f2

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

.github/workflows/deploy-dev-docs.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Deploy Dev Docs to Dockerhub
2+
on:
3+
push:
4+
branches: ["dev"]
5+
6+
jobs:
7+
docker:
8+
name: Build and push Docker image
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
14+
- name: Remove .git
15+
run: rm -rf .git
16+
17+
- name: Set up Docker Buildx
18+
uses: docker/setup-buildx-action@v3
19+
20+
- name: Login to Docker Hub
21+
uses: docker/login-action@v3
22+
with:
23+
username: ${{ secrets.DOCKERHUB_USERNAME }}
24+
password: ${{ secrets.DOCKERHUB_TOKEN }}
25+
26+
- name: Build and push
27+
uses: docker/build-push-action@v5
28+
with:
29+
context: .
30+
push: true
31+
tags: kuzudb/dev-docs:latest

Dockerfile

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM node:20-bookworm
2+
COPY . /home/node/app
3+
WORKDIR /home/node/app
4+
RUN npm i
5+
RUN npx astro build
6+
# Disallow all robots for dev documentation
7+
RUN echo "User-agent: *\nDisallow: /" > dist/robots.txt
8+
RUN npm i -g http-server
9+
EXPOSE 8082
10+
CMD [ "http-server", "dist", "-p 8082" ]

compose.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
services:
2+
kuzu-docs-server:
3+
image: kuzudb/dev-docs
4+
pull_policy: always
5+
ports:
6+
- "8082:8082"
7+
restart: always
8+
labels:
9+
- com.centurylinklabs.watchtower.enable=true

0 commit comments

Comments
 (0)