Skip to content
Merged
Changes from all 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
23 changes: 10 additions & 13 deletions .github/workflows/deploy-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,23 @@ jobs:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
# 0. Validate required secrets and inputs
- name: Validate inputs and secrets
env:
MONOREPO_READ_TOKEN: ${{ secrets.MONOREPO_READ_TOKEN }}
# 0. Validate inputs
- name: Validate inputs
run: |
if [[ -z "${MONOREPO_READ_TOKEN}" ]]; then
echo "::error::MONOREPO_READ_TOKEN secret is required but not configured."
exit 1
fi
VERSION="${{ inputs.version }}"
if [[ "${VERSION}" != java/v* ]]; then
echo "::error::VERSION must start with 'java/v' (got: '${VERSION}')"
if [[ -z "${VERSION}" ]]; then
echo "::error::version input is required"
exit 1
fi
if [[ "${VERSION}" == *"../"* ]]; then
echo "::error::VERSION must not contain '../'"
echo "::error::version must not contain '../'"
exit 1
fi
TAG="${{ inputs.monorepo_tag }}"
if [[ "${TAG}" != java/v* ]]; then
echo "::error::monorepo_tag must start with 'java/v' (got: '${TAG}')"
exit 1
fi
DEPLOY_VERSION="${VERSION#java/v}"
echo "DEPLOY_VERSION=${DEPLOY_VERSION}" >> "$GITHUB_ENV"

# 1. Checkout this (standalone) repo — has src/site/, pom.xml, templates
- name: Checkout standalone repo
Expand Down
Loading