Skip to content

Commit

Permalink
Add CF pages build script
Browse files Browse the repository at this point in the history
  • Loading branch information
BradHacker committed Apr 22, 2024
1 parent f5897b9 commit 3a1f600
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cf_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

# Build script for deploying to Cloudflare Pages (https://community.cloudflare.com/t/different-build-commands-for-build-previews/266084)

if [ "$CF_PAGES_BRANCH" == "gh-pages" ]; then
# Just copy the output into the site/ dir on gh-pages (already built by mike)
mkdir site/
ls | grep -v "site" | xargs -n1 mv -t site
else
# Else run mkdocs build to compile in Poetry venv
poetry run mkdocs build
fi

0 comments on commit 3a1f600

Please sign in to comment.