name: Website

on:
  push:
    branches: [dev]
  workflow_dispatch:

jobs:
  publish:
    name: Website veröffentlichen
    if: gitea.repository == 'fte/FTE-Homepage'
    runs-on: act-runnerV2
    steps:
    - name: clone
      uses: actions/checkout@v4
    - name: npm install
      env:
        CI: "true"
      run: npm ci --no-audit --no-fund
    - name: build
      env:
        HUGO_SECURITY_EXEC_ALLOW: "node|(postcss)"
      run: hugo --minify --gc --baseURL "https://dev.ftecke.de/"
    - name: deploy
      run: |
        cd public
        rsync -azr --delete ./ /opt/data/webdata/