Skip to content

Commit 53cfe24

Browse files
committed
chore(ci): add pull request previews
Signed-off-by: Simon Ser <contact@emersion.fr>
1 parent c6346b4 commit 53cfe24

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,3 +122,27 @@ jobs:
122122
with:
123123
name: build-standalone-demo
124124
path: dist/netzgrafik-frontend/
125+
126+
deploy-preview:
127+
runs-on: ubuntu-latest
128+
needs: build-standalone
129+
if: ${{ github.event_name == 'pull_request' && contains(fromJSON('["opened", "reopened", "synchronize", "closed"]'), github.event.action) }}
130+
steps:
131+
- uses: OpenRailAssociation/web-deployment-action@v1
132+
with:
133+
artifact_name: build-standalone
134+
condition_production: false # GitHub Pages is used for production
135+
domain_preview: ${{ vars.WEB_DOMAIN_PREVIEW }}
136+
dir_base: ${{ vars.WEB_DIR_BASE }}
137+
dir_preview_base: ${{ vars.WEB_DIR_PREVIEW_BASE }}
138+
dir_preview_subdir: nge-pr-${{ github.event.number }}
139+
ssh_host: ${{ vars.WEB_SSH_HOST }}
140+
ssh_user: ${{ vars.WEB_SSH_USER }}
141+
ssh_key: ${{ secrets.DEMO_WEBSITE_SSH_KEY }}
142+
linkchecker_enabled: false
143+
sticky_comment_enabled: false
144+
step_summary_enabled: true
145+
gh_deployment: demo
146+
env:
147+
HAVE_SSH_KEY: ${{ secrets.DEMO_WEBSITE_SSH_KEY != '' }}
148+
if: ${{ env.HAVE_SSH_KEY == 'true' }}

0 commit comments

Comments
 (0)