Skip to content

Commit 597b32c

Browse files
authored
Merge pull request #71 from ByteInternet/deployment_environments
2 parents e0e1a91 + 38b3510 commit 597b32c

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/deploy.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ jobs:
3636
deploy_acceptance:
3737
needs: build
3838
runs-on: ubuntu-latest
39+
environment:
40+
name: acceptance
41+
url: ${{ steps.get_brancher_hostname.outputs.BRANCHER_URL }}
3942
if: github.ref != 'refs/heads/master'
4043
container: quay.io/hypernode/deploy:3-php8.1-node18
4144
steps:
@@ -54,16 +57,20 @@ jobs:
5457
env:
5558
HYPERNODE_API_TOKEN: ${{ secrets.HYPERNODE_API_TOKEN }}
5659
- name: Get brancher hostname
57-
run: echo "BRANCHER_HOSTNAME=$(jq .hostnames[0] deployment-report.json -r)" >> $GITHUB_ENV
60+
id: get_brancher_hostname
61+
run: echo "BRANCHER_URL=https://$(jq .hostnames[0] deployment-report.json -r)" >> $GITHUB_OUTPUT
5862
- name: Comment hostname on PR
5963
uses: thollander/actions-comment-pull-request@v1
6064
with:
6165
message: |
62-
Acceptance server is available at https://${{ env.BRANCHER_HOSTNAME }}
66+
Acceptance server is available at ${{ steps.get_brancher_hostname.outputs.BRANCHER_URL }}
6367
6468
deploy_production:
6569
needs: build
6670
runs-on: ubuntu-latest
71+
environment:
72+
name: production
73+
url: https://docs.hypernode.io
6774
if: github.ref == 'refs/heads/master'
6875
container: quay.io/hypernode/deploy:3-php8.1-node18
6976
steps:

0 commit comments

Comments
 (0)