Skip to content

Commit

Permalink
feat(github): using new workflow_run feature to trigger storybook tes…
Browse files Browse the repository at this point in the history
…ts workflow (#282)
  • Loading branch information
masoudmanson authored Nov 8, 2022
1 parent 41cf805 commit 5e8e466
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/storybook-tests.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
name: Storybook Tests
on: deployment_status
on:
workflow_run:
workflows: ["Build and Deploy"]
type:
- complete
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
if: github.event.deployment_status.state == 'success'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
Expand All @@ -15,4 +18,4 @@ jobs:
- name: Run Storybook tests
run: yarn test-storybook
env:
TARGET_URL: "${{ github.event.deployment_status.target_url }}"
TARGET_URL: "https://chanzuckerberg.github.io/sci-components"
2 changes: 1 addition & 1 deletion .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
GITHUB_TOKEN: ${{ secrets.DEPLOY_AND_TESTS }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: docs-build # The folder that the build-storybook script generates files.
CLEAN: true # Automatically remove deleted files from the deploy branch

0 comments on commit 5e8e466

Please sign in to comment.