Skip to content

Deploy Demo App Preview to Netlify #2030

Deploy Demo App Preview to Netlify

Deploy Demo App Preview to Netlify #2030

Workflow file for this run

###
#
# Deploys a pre-built demo app to netlify
#
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
#
###
name: Deploy Demo App Preview to Netlify
on:
workflow_run:
workflows: ['Build Demo App']
types:
- completed
jobs:
deploy:
runs-on: ubuntu-latest
if: >
${{ github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: swisspost/design-system/.github/actions/setup-pnpm@main
- name: Download build artifacts
uses: swisspost/design-system/.github/actions/artifact-download@main
id: build
with:
name: design-system-demo
folder: build-output
- run: ls -R
- name: Deploy demo app to netlify
uses: swisspost/design-system/.github/actions/deploy-to-netlify@main
id: deploy
with:
id: ${{ steps.build.outputs.id }}
netlify_auth_token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
netlify_site_id: ${{ secrets.NETLIFY_SITE_ID }}
netlify_site_url: swisspost-web-frontend.netlify.app
folder: ${{ steps.build.outputs.folder }}
comment_token: ${{ secrets.SWISSPOSTDEVS_ACCESS_TOKEN }}
comment_author: swisspost-bot
package_name: '@swisspost/design-system-demo'