mirror of
https://github.com/dat515-2025/Group-8.git
synced 2026-03-22 06:57:47 +01:00
feat(infrastructure): add frontend, deploy to cloudflare
This commit is contained in:
8
.github/workflows/frontend-pages.yml
vendored
8
.github/workflows/frontend-pages.yml
vendored
@@ -115,9 +115,11 @@ jobs:
|
||||
# Prefer manual input, then repo variable, fallback to repo-name
|
||||
INPUT_NAME='${{ inputs.project_name }}'
|
||||
VAR_NAME='${{ vars.CF_PAGES_PROJECT_NAME }}'
|
||||
if [ -n "$INPUT_NAME" ]; then PNAME="$INPUT_NAME";
|
||||
elif [ -n "$VAR_NAME" ]; then PNAME="$VAR_NAME";
|
||||
else PNAME="${GITHUB_REPOSITORY##*/}-frontend"; fi
|
||||
if [ -n "$INPUT_NAME" ]; then PNAME_RAW="$INPUT_NAME";
|
||||
elif [ -n "$VAR_NAME" ]; then PNAME_RAW="$VAR_NAME";
|
||||
else PNAME_RAW="${GITHUB_REPOSITORY##*/}-frontend"; fi
|
||||
# Normalize project name to lowercase to satisfy Cloudflare Pages naming
|
||||
PNAME="${PNAME_RAW,,}"
|
||||
# Determine branch for Pages
|
||||
if [ "${INPUT_MODE}" = "pr" ]; then
|
||||
if [ -z "${INPUT_PR}" ]; then echo "pr_number is required when mode=pr"; exit 1; fi
|
||||
|
||||
Reference in New Issue
Block a user