Skip to content

Commit

Permalink
chore(workflow): update action path
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverschuerch committed May 2, 2024
1 parent d6816ec commit 93e6565
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 34 deletions.
31 changes: 0 additions & 31 deletions .github/actions/preview-message-creation/action.yaml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/actions/preview/message/creation/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
###
#
# used action https://github.com/marketplace/actions/github-script
#
###

name: Preview message creation
description: Append a preview url message in the pr body, if not already present

inputs:
access-token:
description: The access_token to use for commenting.
required: true

runs:
using: composite
steps:
- uses: actions/github-script@v7
with:
github-token: ${{ inputs.access-token }}
script: |
github.rest.issues.createComment({
repo: context.repo.repo
owner: context.repo.owner,
issue_number: context.issue.number,
body: '**Automatic previews**\nPreview URLs will be added here, once they are ready... ![loader](https://github.com/swisspost/design-system/assets/9716662/49a75898-7093-4ffb-9460-071ff194459d)' })
8 changes: 5 additions & 3 deletions .github/workflows/build-documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Provide preview message
uses: swisspost/design-system/.github/actions/preview-message-creation

- name: Checkout
uses: actions/checkout@v4

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

- name: Setup
uses: swisspost/design-system/.github/actions/setup-pnpm@main

Expand Down

0 comments on commit 93e6565

Please sign in to comment.