1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-11-27 08:21:03 +02:00

Chore: Fix plugin website build (#9516)

This commit is contained in:
Henry Heino 2023-12-17 12:54:56 -08:00 committed by GitHub
parent dc8ea620a6
commit 858205a72b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,10 +59,33 @@ git pull --rebase
git push
# ------------------------------------------------------------------------------
# Build and deploy the website
# ------------------------------------------------------------------------------
cd "$JOPLIN_WEBSITE_ROOT_DIR"
git checkout master
git pull --rebase
cd "$JOPLIN_ROOT_DIR"
CROWDIN_PERSONAL_TOKEN="$CROWDIN_PERSONAL_TOKEN" yarn crowdinDownload
yarn buildWebsite
cd "$JOPLIN_WEBSITE_ROOT_DIR"
git add -A
git commit -m "Updated website
Auto-updated using $SCRIPT_NAME" || true
git pull --rebase
git push
# Copy and update the plugin website.
#
# For security, the plugin website is built in a separate job without access to SSH
# keys. This file contains the built output of the other job.
#
# We apply this to the existing plugin website to prevent the changes from being overwritten.
BUILT_PLUGIN_WEBSITE_FILE="$JOPLIN_ROOT_DIR/../plugin-website.tar.gz"
if [ -f "$BUILT_PLUGIN_WEBSITE_FILE" ]; then
@ -85,24 +108,3 @@ else
echo "Not updating plugin website -- release ($BUILT_PLUGIN_WEBSITE_FILE) not present"
exit 1
fi
# ------------------------------------------------------------------------------
# Build and deploy the website
# ------------------------------------------------------------------------------
cd "$JOPLIN_WEBSITE_ROOT_DIR"
git checkout master
git pull --rebase
cd "$JOPLIN_ROOT_DIR"
CROWDIN_PERSONAL_TOKEN="$CROWDIN_PERSONAL_TOKEN" yarn crowdinDownload
yarn buildWebsite
cd "$JOPLIN_WEBSITE_ROOT_DIR"
git add -A
git commit -m "Updated website
Auto-updated using $SCRIPT_NAME" || true
git pull --rebase
git push