Skip to content

Commit

Permalink
#1431 set SERVER_NAME during pr deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsimpson committed Jan 3, 2025
1 parent 31db6bf commit 9703cff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 89 deletions.
86 changes: 0 additions & 86 deletions .envsubst.template

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/pr-demo-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
name: Deploy pr preview
on:
pull_request:
# (pull_request_target get fired on external contributer pull requests)
# (pull_request_target get fired on external contributor pull requests)
#pull_request_target
paths-ignore:
- '**/README.md'
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
# Enforce max 60 chars, always end with alnum char
echo SUBDOMAIN=`echo "${{ github.head_ref }}" | tr '[:upper:]' '[:lower:]' | cut -c -60 | rev | sed 's/[^[:alnum:]]//1' | rev` >> $GITHUB_ENV
echo $GITHUB_ENV
- name: Create dokku app for pr branch if dosent already exist using dokku apps:create
- name: Create dokku app for pr branch if doesn't already exist using dokku apps:create
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
DOKKU_HOST: ${{ secrets.DOKKU_HOST }}
Expand All @@ -66,6 +66,7 @@ jobs:
ssh dokku@$DOKKU_HOST -C "dokku config:set --no-restart ${{ env.SUBDOMAIN }} STRIPE_CONNECT_ACCOUNT_ANNOUNCER_HOST=${{ secrets.STRIPE_CONNECT_ACCOUNT_ANNOUNCER_HOST }}"
ssh dokku@$DOKKU_HOST -C "dokku config:set --no-restart ${{ env.SUBDOMAIN }} FLASK_ENV=development"
ssh dokku@$DOKKU_HOST -C "dokku config:set --no-restart ${{ env.SUBDOMAIN }} EMAIL_QUEUE_FOLDER=${{ secrets.DOKKU_EMAIL_QUEUE_FOLDER }}"
ssh dokku@$DOKKU_HOST -C "dokku config:set --no-restart ${{ env.SUBDOMAIN }} SERVER_NAME=${{ env.SUBDOMAIN }}.pcpink.co.uk"
# mount email-queue folder
ssh dokku@$DOKKU_HOST -C "dokku storage:mount ${{ github.head_ref }} ${{ secrets.HOST_EMAIL_QUEUE_PATH }}:${{ secrets.DOKKU_EMAIL_QUEUE_FOLDER }} && dokku ps:restart ${{ github.head_ref }} || true"
Expand Down Expand Up @@ -120,7 +121,6 @@ jobs:
run: |
set -x
cp tests/browser-automated-tests-playwright/.env.example tests/browser-automated-tests-playwright/.env
cp .env.example .env
cd tests/browser-automated-tests-playwright
python3 run-playwright-tests.py
Expand Down

0 comments on commit 9703cff

Please sign in to comment.