Deploy Demo App Preview to Netlify #2693
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
# | |
# DEPRECATED: This Action can be removed as soon as we start working on V2/V9 | |
# | |
### | |
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: ./.github/actions/setup-pnpm | |
- name: Download build artifacts | |
uses: ./.github/actions/artifact-download | |
id: build | |
with: | |
name: design-system-demo | |
folder: build-output | |
- run: ls -R | |
- name: Deploy demo app to netlify | |
uses: ./.github/actions/deploy-to-netlify | |
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 }} | |
package_name: '@swisspost/design-system-demo' | |
- name: Update preview message | |
uses: ./.github/actions/preview/message/update | |
with: | |
access-token: ${{ secrets.SWISSPOSTDEVS_ACCESS_TOKEN }} | |
issue-number: ${{ steps.build.outputs.id }} | |
preview-url: ${{ steps.deploy.outputs.preview-url }} |