Skip to content

Commit

Permalink
fix: remove docker docs, use nix instead
Browse files Browse the repository at this point in the history
  • Loading branch information
nicokant committed Feb 12, 2025
1 parent 815ed63 commit e4bbc12
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 103 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Publish Documentation
on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write

environment:
# environment created automatically by GitHub
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Nix
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable

- name: Build
run: cd docs && nix-shell --run "mdbook build"

- name: Archive book
uses: actions/upload-artifact@v4
with:
name: book
path: docs/book/*

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: "docs/book"

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
31 changes: 0 additions & 31 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ jobs:
- context: ./nginx
args: TEMPLATE_NAME=maps
image: ghcr.io/ninanor/nina-catalogue-maps-proxy
- context: ./docs
image: ghcr.io/ninanor/nina-catalogue-docs
target: prod

permissions:
contents: read
Expand Down Expand Up @@ -60,31 +57,3 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

publish_docs:
if: github.ref == 'refs/heads/master'
needs: build
runs-on: ubuntu-latest
container:
image: ghcr.io/ninanor/nina-catalogue-docs:master
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

permissions:
pages: write
id-token: write

environment:
# environment created automatically by GitHub
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: "/var/www"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
26 changes: 0 additions & 26 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,32 +117,6 @@ services:
ports:
- 5432:5432

# documentation
docs-dev:
image: metadata_catalogue_docs
build:
context: ./docs
dockerfile: ./Dockerfile
target: dev
volumes:
- ./docs:/book
ports:
- "3001:3000"
command: serve --hostname 0.0.0.0
profiles:
- dev

docs:
image: metadata_catalogue_docs
build:
context: ./docs
dockerfile: ./Dockerfile
target: prod
ports:
- "3000:80"
profiles:
- prod

bruno:
build:
dockerfile: ./bruno/Dockerfile
Expand Down
35 changes: 0 additions & 35 deletions docs/Dockerfile

This file was deleted.

8 changes: 8 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# How to document

```
nix-shell
mdbook serve
mdbook build
```
11 changes: 0 additions & 11 deletions docs/default.conf.template

This file was deleted.

9 changes: 9 additions & 0 deletions docs/shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
with import <nixpkgs> {
};

let in pkgs.mkShell rec {
buildInputs = [
mdbook
mdbook-kroki-preprocessor
];
}

0 comments on commit e4bbc12

Please sign in to comment.