From 38b35100608de2c88ccb8a88e08040e704708eb4 Mon Sep 17 00:00:00 2001 From: Timon de Groot Date: Fri, 13 Jan 2023 13:13:26 +0100 Subject: [PATCH] ci: Add deployment environments --- .github/workflows/deploy.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index b6c0a74a..be96d10f 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -36,6 +36,9 @@ jobs: deploy_acceptance: needs: build runs-on: ubuntu-latest + environment: + name: acceptance + url: ${{ steps.get_brancher_hostname.outputs.BRANCHER_URL }} if: github.ref != 'refs/heads/master' container: quay.io/hypernode/deploy:3-php8.1-node18 steps: @@ -54,16 +57,20 @@ jobs: env: HYPERNODE_API_TOKEN: ${{ secrets.HYPERNODE_API_TOKEN }} - name: Get brancher hostname - run: echo "BRANCHER_HOSTNAME=$(jq .hostnames[0] deployment-report.json -r)" >> $GITHUB_ENV + id: get_brancher_hostname + run: echo "BRANCHER_URL=https://$(jq .hostnames[0] deployment-report.json -r)" >> $GITHUB_OUTPUT - name: Comment hostname on PR uses: thollander/actions-comment-pull-request@v1 with: message: | - Acceptance server is available at https://${{ env.BRANCHER_HOSTNAME }} + Acceptance server is available at ${{ steps.get_brancher_hostname.outputs.BRANCHER_URL }} deploy_production: needs: build runs-on: ubuntu-latest + environment: + name: production + url: https://docs.hypernode.io if: github.ref == 'refs/heads/master' container: quay.io/hypernode/deploy:3-php8.1-node18 steps: