Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revert: deletion of the deplay-demo.yaml file on main (this is needed here for older versions) #4234

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/deploy-demo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
@@ -1,51 +0,0 @@
###
#
# Not used for v9 anymore
# But since workflows run always from the `main` branch we need to keep it for older versions
#
###

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

- 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 }}
Loading