Skip to content
Merged
Show file tree
Hide file tree
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
26 changes: 25 additions & 1 deletion .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,39 @@ on:
- main
pull_request:

permissions:
pull-requests: write

jobs:
storybook:
runs-on: ubuntu-latest
steps:
- uses: Taucher2003/GitLab-Pipeline-Action@1.1.0
- uses: Taucher2003/GitLab-Pipeline-Action@1.2.0
name: Run pipeline
id: pipeline
with:
GL_SERVER_URL: https://gitlab.com
GL_PROJECT_ID: '52344025'
GL_RUNNER_TOKEN: ${{ secrets.GL_RUNNER_TOKEN }}
GL_API_TOKEN: ${{ secrets.GL_API_TOKEN }}
SHOW_JOB_LOGS: all

- name: Find existing comment
uses: peter-evans/find-comment@v2
id: find-comment
if: ${{ !cancelled() && github.event_name == 'pull_request' }}
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: <!-- glpa_comment:storybook -->

- name: Create or update comment
uses: peter-evans/create-or-update-comment@v3
if: ${{ !cancelled() && github.event_name == 'pull_request' }}
with:
comment-id: ${{ steps.find-comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
<!-- glpa_comment:storybook -->
${{ steps.pipeline.outputs.SUMMARY_TEXT }}
edit-mode: replace
5 changes: 4 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ storybook:build:
script:
- npm ci
- npm run storybook:build
- echo "Storybook available at https://code0-tech.gitlab.io/-/base-ui/-/jobs/$CI_JOB_ID/artifacts/storybook-static/index.html"
- |
echo -e "\e[0Ksection_start:`date +%s`:glpa_summary\r\e[0KHeader of the summary"
echo "Storybook available at https://code0-tech.gitlab.io/-/base-ui/-/jobs/$CI_JOB_ID/artifacts/storybook-static/index.html"
echo -e "\e[0Ksection_end:`date +%s`:glpa_summary\r\e[0K"
environment:
name: storybook/$CI_COMMIT_REF_SLUG
url: https://code0-tech.gitlab.io/-/base-ui/-/jobs/$CI_JOB_ID/artifacts/storybook-static/index.html
Expand Down