Skip to content

Add MIT License file #73

Add MIT License file

Add MIT License file #73

name: Build & Publish to GitHub Pages
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
build_site:
runs-on: ubuntu-latest
permissions:
contents: read
env:
NODE_VERSION: 20
PUBLISH_DIR: dist/gossembrot-portal_static
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Install dependencies
run: npm ci
# If you build the SQLite from CSVs during CI:
- name: Build SQLite database
run: node tools/build-db.js
- name: Build Angular (static)
run: npm run build:static:gh-pages
# SPA fallback for GitHub Pages deep links (404 → app)
- name: Add 404 fallback
run: |
if [ -f "${{ env.PUBLISH_DIR }}/index.html" ]; then
cp "${{ env.PUBLISH_DIR }}/index.html" "${{ env.PUBLISH_DIR }}/404.html"
fi
- name: Upload Artifacts
uses: actions/upload-pages-artifact@v3
with:
path: ${{ env.PUBLISH_DIR }}
deploy:
needs: build_site
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v4