Skip to content

Commit 695b1f2

Browse files
committed
Redo verification files step
Signed-off-by: FooterManDev <footerman.work@gmail.com>
1 parent ab3560d commit 695b1f2

File tree

1 file changed

+23
-14
lines changed

1 file changed

+23
-14
lines changed

.github/workflows/build-docs.yml

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -84,22 +84,31 @@ jobs:
8484
mkdir -p "$DEST"
8585
unzip "$ZIP_FILE" -d "$DEST"
8686
87-
- name: Copy verification files into build root
87+
- name: Place verification files
8888
run: |
89+
GOOGLE_SRC=$(find .github -maxdepth 1 -type f -name 'google*.html' | head -n1)
90+
DISCORD_SRC=".github/discord"
8991
DEST="${{ needs.build.outputs.build_dir }}"
90-
echo "Copying verification files to $DEST"
91-
# GitHub-stored verification files:
92-
cp_if_exists() {
93-
SRC="$1"
94-
if [ -f "$SRC" ]; then
95-
cp "$SRC" "$DEST/"
96-
echo "Copied $SRC -> $DEST/"
97-
else
98-
echo "Warning: $SRC not found in repo. Skipping."
99-
fi
100-
}
101-
cp_if_exists ".github/google5c656ab590a2ed69.html"
102-
cp_if_exists ".github/discord"
92+
93+
echo "Deploy build dir: $DEST"
94+
if [ -z "$GOOGLE_SRC" ]; then
95+
echo "Error: no google*.html found under .github"
96+
exit 1
97+
fi
98+
99+
# Ensure destination exists and copy Google file to site root
100+
mkdir -p "$DEST"
101+
cp "$GOOGLE_SRC" "$DEST/$(basename "$GOOGLE_SRC")"
102+
echo "Copied $GOOGLE_SRC -> $DEST/$(basename "$GOOGLE_SRC")"
103+
104+
# Ensure .well-known exists and copy Discord token there
105+
if [ ! -f "$DISCORD_SRC" ]; then
106+
echo "Error: $DISCORD_SRC not found in repo"
107+
exit 1
108+
fi
109+
mkdir -p "$DEST/.well-known"
110+
cp "$DISCORD_SRC" "$DEST/.well-known/discord"
111+
echo "Copied $DISCORD_SRC -> $DEST/.well-known/discord"
103112
104113
- name: Deploy to CF
105114
uses: cloudflare/wrangler-action@v3

0 commit comments

Comments
 (0)