From 16cd7ef3bcd031d9c19431c205c6737eea014c5c Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Tue, 30 Jul 2024 14:21:38 -0400 Subject: [PATCH] change fakeyou build script --- scripts/ci/build-fakeyou.com.sh | 35 +++++-- src/netlify_configs/fakeyou.com/_redirects | 101 +++++++++++++++++++++ 2 files changed, 126 insertions(+), 10 deletions(-) create mode 100644 src/netlify_configs/fakeyou.com/_redirects diff --git a/scripts/ci/build-fakeyou.com.sh b/scripts/ci/build-fakeyou.com.sh index aeace6f1a9..2003ae6e36 100755 --- a/scripts/ci/build-fakeyou.com.sh +++ b/scripts/ci/build-fakeyou.com.sh @@ -15,11 +15,20 @@ function replace_commit_ref { # find . -type f -exec sed -i '' -e "s/CURRENT_STORYTELLER_VERSION/${SHORT_SHA}/g" {} + } -function build_project { +function build_website { + pushd src/website yarn install yarn test-fakeyou --verbose # --ignore-engines: https://stackoverflow.com/a/59615348 yarn build-fakeyou --verbose --ignore-optional --ignore-engines + popd +} + +function build_blog { + pushd src/gatsby-blog + yarn install + yarn build + popd } echo "Current working directory:" @@ -28,15 +37,21 @@ pwd echo "Labelling build with short SHA..." replace_commit_ref -echo "Building project..." -pushd src/website -build_project -popd +echo "Building blog..." +build_blog -echo "Copying built artifacts..." -mkdir fakeyou.com -mv src/website/packages/fakeyou.com/build/ fakeyou.com/build/ +echo "Building website..." +build_website + +echo "Create final output directory..." +mkdir -p fakeyou.com/build/blog +mkdir -p fakeyou.com/build/website + +echo "Copying blog artifacts..." +mv src/gatsby-blog/public/ fakeyou.com/build/blog/ + +echo "Copying website artifacts..." +mv src/website/packages/fakeyou.com/build/ fakeyou.com/build/website/ echo "Copying redirects configuration to Netlify build dir..." -cp src/website/_redirects fakeyou.com/build/ - +cp src/netlify_configs/fakeyou.com/_redirects fakeyou.com/build/ diff --git a/src/netlify_configs/fakeyou.com/_redirects b/src/netlify_configs/fakeyou.com/_redirects new file mode 100644 index 0000000000..ae5567990c --- /dev/null +++ b/src/netlify_configs/fakeyou.com/_redirects @@ -0,0 +1,101 @@ +# We can't redirect everything until legacy vocodes is dead + +# Website redirects +/ /website/index.html 200 +/about* /website/index.html 200 +/acting-face* /website/index.html 200 +/ai-face-mirror* /website/index.html 200 +/beta-key* /website/index.html 200 + +# Blog redirects +/blog* /blog/index.html 200 + +# TODO: Fix these - + +/beta-keys* /index.html 200 +/category* /index.html 200 +/channel* /index.html 200 +/channels* /index.html 200 +/character* /index.html 200 +/checkout_cancel* /index.html 200 +/checkout_success* /index.html 200 +/clone* /index.html 200 +/coming-soon* /index.html 200 +/commissions* /index.html 200 +/contribute* /index.html 200 +/creator-onboarding* /index.html 200 +/dashboard* /index.html 200 +/edit-cover-image* /index.html 200 +/engine-compositor* /index.html 200 +/explore* /index.html 200 +/face-animator* /index.html 200 +/fbx-to-gltf* /index.html 200 +/firehose* /index.html 200 +/guide* /index.html 200 +/inference-jobs-list* /index.html 200 +/jobs* /index.html 200 +/landing* /index.html 200 +/landing_temp* /index.html 200 +/leaderboard* /index.html 200 +/login* /index.html 200 +/media* /index.html 200 +/mirror-motion* /index.html 200 +/moderation* /index.html 200 +/motion-mirror* /index.html 200 +/news* /index.html 200 +/obs_configs* /index.html 200 +/old* /index.html 200 +/password-reset* /index.html 200 +/patrons* /index.html 200 +/pending* /index.html 200 +/portal_success* /index.html 200 +/pricing* /index.html 200 +/privacy* /index.html 200 +/product-usage* /index.html 200 +/profile* /index.html 200 +/search* /index.html 200 +/signup* /index.html 200 +/stream* /index.html 200 +/studio* /index.html 200 +/studio-mobile-check* /index.html 200 +/style-video* /index.html 200 +/terms* /index.html 200 +/testing* /index.html 200 +/text-to-image* /index.html 200 +/tools* /index.html 200 +/tts* /index.html 200 +/tts_configs* /index.html 200 +/twitch* /index.html 200 +/upload* /index.html 200 +/video* /index.html 200 +/video-style* /index.html 200 +/voice-conversion* /index.html 200 +/voice-designer* /index.html 200 +/w2l* /index.html 200 +/waitlist-next-steps* /index.html 200 +/weight* /index.html 200 +/welcome-to-studio* /index.html 200 +/welcome /index.html 200 + +# Test paths +/dev-tts* /index.html 200 +/dev-upload* /index.html 200 +/dev-upload-alt* /index.html 200 +/tts-dev* /index.html 200 + +# Old paths +/face-animation* /face-animator 302 + +# This is for YCombinator. +# This is the *OLD* video for Summer 2022. We'll re-edit. +# PLEASE DO NOT ACECSS THIS URL OR WATCH. IT WILL CHANGE THE +# VIEW STATISTICS AND WE WON'T BE ABLE TO TELL IF THEY SAW IT +#/demo https://www.youtube.com/watch?v=wfFpi-Mv3fY 302 + +# This is for AI Grant. +# This is the *OLD* video for Summer 2022. We'll re-edit. +# PLEASE DO NOT ACECSS THIS URL OR WATCH. IT WILL CHANGE THE +# VIEW STATISTICS AND WE WON'T BE ABLE TO TELL IF THEY SAW IT +#/ai-grant-founder-video https://www.youtube.com/watch?v=Cj7rchSSuLg 302 +#/ai-grant-demo https://www.youtube.com/watch?v=0EOZsrH7jxI 302 +