Skip to content

feat(STEF-2702): openstef-meta cleanup & release pipeline fixes (#822) #100

feat(STEF-2702): openstef-meta cleanup & release pipeline fixes (#822)

feat(STEF-2702): openstef-meta cleanup & release pipeline fixes (#822) #100

Workflow file for this run

# SPDX-FileCopyrightText: 2025 Contributors to the OpenSTEF project <[email protected]>
#
# SPDX-License-Identifier: MPL-2.0
name: Deploy V4 Documentation
on:
push:
branches: [ release/v4.0.0 ]
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
jobs:
deploy-v4-docs:
name: Build and Deploy V4 Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout release/v4.0.0 branch
uses: actions/checkout@v4
with:
show-progress: false
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
activate-environment: true
enable-cache: true
- name: Install dependencies
run: uv sync --frozen --no-install-project --all-groups --all-extras
- name: Build Sphinx documentation
run: poe docs
- name: Checkout gh-pages branch for deployment
uses: actions/checkout@v4
with:
ref: gh-pages
path: gh-pages-repo
show-progress: false
- name: Update v4 documentation
run: |
# Create or update the v4 directory
mkdir -p gh-pages-repo/v4
# Remove old v4 content and copy new content
rm -rf gh-pages-repo/v4/*
cp -r docs/build/html/* gh-pages-repo/v4/
- name: Configure git, stage, and commit changes
run: |
cd gh-pages-repo
# Configure git
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
# Stage changes
git add v4/
# Check if there are staged changes and commit if so
if ! git diff --staged --quiet; then
git commit -m "Deploy v4.0.0 documentation from $(echo $GITHUB_SHA | cut -c1-7)"
echo "✅ Changes committed successfully"
else
echo "ℹ️ No changes to commit"
fi
- name: Push changes to gh-pages
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
directory: gh-pages-repo