mirror of https://github.com/snachodog/mybuddy.git
Set hosts and origins during review app predeploy
This commit is contained in:
parent
eae11b5f63
commit
841d6562de
|
@ -9,7 +9,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: pr-${{ github.event.pull_request.number }}
|
||||
url: https://pr-${{ github.event.pull_request.number }}.dokku.baby-buddy.net
|
||||
url: http://pr-${{ github.event.pull_request.number }}.dokku.baby-buddy.net
|
||||
if: github.event.action == 'labeled' && github.event.label.name == 'to review'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
@ -26,7 +26,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: pr-${{ github.event.pull_request.number }}
|
||||
url: https://pr-${{ github.event.pull_request.number }}.dokku.baby-buddy.net
|
||||
url: http://pr-${{ github.event.pull_request.number }}.dokku.baby-buddy.net
|
||||
if: github.event.action == 'unlabeled' && github.event.label.name == 'to review'
|
||||
steps:
|
||||
- name: Destroy review app
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#!/bin/sh -l
|
||||
|
||||
if [ "$IS_REVIEW_APP" = "true" ]; then
|
||||
ssh "$SSH_REMOTE" -- config:set "$APP_NAME" "DOMAIN=$APP_NAME.dokku.baby-buddy.net"
|
||||
echo "configured the review app domain"
|
||||
DOMAIN="$APP_NAME.dokku.baby-buddy.net"
|
||||
ssh "$SSH_REMOTE" -- config:set "$APP_NAME" "ALLOWED_HOSTS=$DOMAIN CSRF_TRUSTED_ORIGINS=http://$DOMAIN"
|
||||
echo "Review app configured"
|
||||
fi
|
Loading…
Reference in New Issue