Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.git
.github
node_modules
npm-debug.log
.DS_Store
img
Comment thread
pasibun marked this conversation as resolved.
Outdated
84 changes: 27 additions & 57 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,73 +1,43 @@
name: Deploy Static Docs
name: Build & Deploy Static Docs
Comment thread
pasibun marked this conversation as resolved.
Outdated

on:
pull_request:
branches:
- main
types:
- closed
push:
branches:
- develop
- main
Comment thread
pasibun marked this conversation as resolved.
workflow_dispatch:
schedule:
- cron: '0 6 1 * *'

jobs:
deploy:
name: Deploy `/docs` via SCP
runs-on: ubuntu-22.04

if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'
env:
AZURE_CONTAINER_REGISTRY: geonovumregistrytest.azurecr.io
Copy link
Copy Markdown

@underdarknl underdarknl Nov 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test registry? fixen voor merge gok ik
En wellicht gewoon 'CONTAINER_REGISTRY' noemen en uit de global settings halen ipv per repos setten.

WEB_IMAGE_NAME: geonovumregistrytest.azurecr.io/docs-geostandaarden

env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
SSH_HOST: ${{ secrets.SSH_HOST }}
SSH_USER: ${{ secrets.SSH_USER }}
jobs:
build-and-push-web:
name: Build & Push Web Image
runs-on: ubuntu-latest
if: github.event_name != 'schedule'

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

# - name: Set up Node.js
# uses: actions/setup-node@v4
# with:
# node-version: 23
#
# - name: Run build script
# run: node build.js

- name: Setup SSH key
run: |
mkdir -p ~/.ssh
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H "$SSH_HOST" >> ~/.ssh/known_hosts

- name: Set target path based on branch
id: path
run: |
if [[ "${GITHUB_REF##*/}" == "main" ]]; then
echo "dir=${{ secrets.SSH_TARGET_DIR_PROD }}" >> $GITHUB_OUTPUT
else
echo "dir=${{ secrets.SSH_TARGET_DIR_DEV }}" >> $GITHUB_OUTPUT
fi

- name: Copy `.` via rsync
run: |
rsync -avz \
--partial \
--delete \
--exclude='.git/' \
--exclude='.github/' \
--exclude='.gitignore' \
--exclude='.gitattributes' \
--exclude='.DS_Store' \
--exclude='img/' \
--exclude='README.md/' \
-e "ssh -i ~/.ssh/id_rsa" \
. \
"${SSH_USER}@${SSH_HOST}:${{ steps.path.outputs.dir }}/"
- name: Login to ACR
uses: docker/login-action@v3
with:
registry: ${{ env.AZURE_CONTAINER_REGISTRY }}
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}

- name: Build & push container image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
tags: |
${{ env.WEB_IMAGE_NAME }}:latest
${{ env.WEB_IMAGE_NAME }}:${{ github.sha }}

monthly_linkcheck:
name: Monthly Linkchecker Report
Expand Down
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Build stage: install dependencies and generate the landing page
FROM node:20-alpine AS builder
WORKDIR /app

COPY package*.json ./
COPY scripts ./scripts
COPY pubDomainList.json ./
COPY . .

RUN npm ci
Comment thread
pasibun marked this conversation as resolved.
Outdated
RUN npm run generate:index

# Runtime stage: serve the static site
FROM node:20-alpine
WORKDIR /usr/src/app

COPY --from=builder /app /usr/src/app
ENV PORT=8080
EXPOSE 8080

CMD ["npm", "run", "start"]
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@ Deze repository wordt **automatisch bijgewerkt** vanuit andere repositories die
- **Merge de PR alleen als alles klopt**.
- Na merge wordt automatisch gedeployed naar **productie**.

## Index bijwerken

De hoofdpagina (`index.html`) wordt tijdens de build vooraf gegenereerd met Node:

```bash
npm install
npm run generate:index
```

Het script (`scripts/generate-index.js`) leest de mappen in deze repository en bouwt dezelfde inhoudsopgave die eerder via `index.php` dynamisch werd opgebouwd. Draai dit script wanneer er folders bijkomen of verdwijnen zodat de pipeline een volledig statische site oplevert.

---

## Vragen?
Expand Down
190 changes: 0 additions & 190 deletions biblio.php

This file was deleted.

14 changes: 0 additions & 14 deletions bro/gen/cors.php

This file was deleted.

Loading