ente/scripts/deploy.sh
Manav Rathi e083c7caf2 Copy the out directory
The symlink does not seem to be working. In the build logs there is nothing
wrong, but at the end CF gives up by saying:

    + ln -sf apps/auth/out
    Finished
    Note: No functions dir at /functions found. Skipping.
    Validating asset output directory
    Failed: build output directory contains links to files that can't be accessed
2024-02-03 16:49:50 +05:30

25 lines
647 B
Bash
Executable file

#!/bin/sh
# This script is run by the Cloudflare Pages integration when deploying the apps
# in this repository. The app to build is decided based on the the value of the
# CF_PAGES_BRANCH environment variable.
#
# Ref: https://developers.cloudflare.com/pages/how-to/build-commands-branches/
#
# The CF Pages configuration is set to use `out/` as the build output directory,
# so once we're done building we copy the app specific output to `out/`.
set -o errexit
set -o xtrace
rm -rf out
if test "$CF_PAGES_BRANCH" = "auth-release"
then
yarn export:auth
cp -R apps/auth/out .
else
yarn export:photos
cp -r apps/photos/out .
fi