Skip to content

Commit

Permalink
chore(workflows): align demo workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverschuerch committed Jul 11, 2024
1 parent 905cb63 commit 02c9fe3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/build-demo.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
###
#
# Build the demo app and all dependencies
#
# This workflow does not have secrets access
# when run from a fork. Artifacts are uploaded
# and used in a subsequent workflow with more
# privileges which does not run unsafe commands.
#
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
# DEPRECATED: This Action can be removed as soon as we start working on V2/V9
#
###

name: Build Demo App
on:
pull_request:
types: [opened, synchronize, edited, reopened]
paths:
- 'packages/intranet-header-workspace/**'
- 'packages/demo/**'
Expand All @@ -29,6 +23,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Create preview message
uses: ./.github/actions/preview/message/create
with:
access-token: ${{ secrets.SWISSPOSTDEVS_ACCESS_TOKEN }}

- name: Setup
uses: ./.github/actions/setup-pnpm

Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/deploy-demo.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
###
#
# Deploys a pre-built demo app to netlify
#
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
# DEPRECATED: This Action can be removed as soon as we start working on V2/V9
#
###

Expand Down Expand Up @@ -45,6 +43,11 @@ jobs:
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'

- 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 }}
4 changes: 2 additions & 2 deletions .github/workflows/release-demo.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
###
#
# Release the demo app whenever it's package json changes on the main branch
# DEPRECATED: This Action can be removed as soon as we start working on V2/V9
#
###

Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:

- name: Install netlify cli
if: steps.check.outputs.changed == 'true'
run: pnpm -g i netlify-cli@15
run: pnpm -g i netlify-cli@17

# Publish demo only if changesets published any packages
- name: Publish demo app to netlify
Expand Down

0 comments on commit 02c9fe3

Please sign in to comment.