Add main netlify deployment on GH actions

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
Erik Michelson 2022-02-06 14:23:15 +01:00 committed by Tilman Vatteroth
parent 720bdefb66
commit 757f957e0a
4 changed files with 88 additions and 1 deletions

15
netlify/deploy-pr.sh Executable file
View file

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