hedgedoc/netlify/deploy.sh
Erik Michelson 523701b3d2 Add netlify deployments for PRs
Co-authored-by: Tilman Vatteroth <git@tilmanvatteroth.de>
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2022-01-26 19:00:56 +01:00

15 lines
396 B
Bash
Executable file

#!/bin/bash
# SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
#
# SPDX-License-Identifier: AGPL-3.0-only
deployid="$1-$2"
json=$(yarn netlify deploy --build --context deploy-preview --alias "${deployid}" --json)
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}"