2022-01-25 15:10:34 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-07-30 21:32:19 +00:00
|
|
|
#
|
|
|
|
# SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
|
2022-01-25 15:10:34 +00:00
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
2022-07-30 21:32:19 +00:00
|
|
|
#
|
2022-01-25 15:10:34 +00:00
|
|
|
|
2022-07-30 22:39:49 +00:00
|
|
|
json=$($(dirname "$0")/netlify-cli.sh deploy --build --prod --json --message "${1:0:8}: $2")
|
2022-01-25 15:10:34 +00:00
|
|
|
|
2022-03-27 21:02:37 +00:00
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
echo "Error while executing netlify! Will try again without json..."
|
2022-07-30 22:39:49 +00:00
|
|
|
$(dirname "$0")/netlify-cli.sh deploy --build --prod --message "${1:0:8}: $2"
|
2022-03-27 21:02:37 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2022-01-30 20:57:58 +00:00
|
|
|
echo "${json}"
|
2022-01-25 15:10:34 +00:00
|
|
|
|
|
|
|
url=$(echo "${json}" | jq -r .deploy_url)
|
|
|
|
logs=$(echo "${json}" | jq -r .logs)
|
|
|
|
|
|
|
|
echo "::set-output name=url::${url}"
|
|
|
|
echo "::set-output name=logs::${logs}"
|