Skip to content

fix: correct docs-deploy workflow YAML formatting #3

fix: correct docs-deploy workflow YAML formatting

fix: correct docs-deploy workflow YAML formatting #3

Workflow file for this run

name: Deploy Documentation to Netcup

Check failure on line 1 in .github/workflows/docs-deploy.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/docs-deploy.yml

Invalid workflow file

(Line: 44, Col: 13): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.NETCUP_URI && secrets.NETCUP_USER && secrets.NETCUP_PASSWORD, (Line: 60, Col: 13): Unrecognized named-value: 'secrets'. Located at position 2 within expression: !secrets.NETCUP_URI || !secrets.NETCUP_USER || !secrets.NETCUP_PASSWORD, (Line: 64, Col: 13): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.CLOUDFLARE_ZONE_ID
on:
push:
branches:
- main
paths:
- 'docs-site/**'
workflow_dispatch:
inputs:
force_deploy:
description: 'Force deployment even if no docs-site changes'
required: false
default: 'false'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
# Only run on main branch to prevent accidental deployments
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: docs-site/package-lock.json
- name: Install dependencies
run: |
cd docs-site
npm ci
- name: Build documentation site
run: |
cd docs-site
npm run build
- name: Deploy to Netcup hosting
# Only deploy if secrets are available
if: ${{ secrets.NETCUP_URI && secrets.NETCUP_USER && secrets.NETCUP_PASSWORD }}
uses: SamKirkland/FTP-Deploy-Action@v4.3.4
with:
server: ${{ secrets.NETCUP_URI }}
username: ${{ secrets.NETCUP_USER }}
password: ${{ secrets.NETCUP_PASSWORD }}
local-dir: ./docs-site/dist/
server-dir: /
exclude: |
**/.git*
**/.git*/**
**/node_modules/**
**/.DS_Store
**/Thumbs.db
- name: Skip deployment (secrets not configured)
if: ${{ !secrets.NETCUP_URI || !secrets.NETCUP_USER || !secrets.NETCUP_PASSWORD }}
run: echo "Skipping deployment - Netcup secrets not configured"
- name: Purge Cloudflare cache (optional)
if: ${{ secrets.CLOUDFLARE_ZONE_ID }}
uses: jakejarvis/cloudflare-purge-action@master
env:
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE_ID }}
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}