Skip to content

Commit

Permalink
add a ci:docs workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed Jul 24, 2023
1 parent 950df76 commit eead744
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,11 @@ jobs:
template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench)

workflows:
docs:
when:
equal: [docs, << pipeline.parameters.workflow >>]
jobs:
- pretty-docs
normal:
when:
equal: [normal, << pipeline.parameters.workflow >>]
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/trigger-circle-ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,25 @@ jobs:
env:
CIRCLE_CI_TOKEN: ${{ secrets.CIRCLE_CI_TOKEN }}
BRANCH: ${{ needs.get-branch.outputs.branch }}
trigger-docs-tests:
runs-on: ubuntu-latest
needs: get-branch
if: github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'ci:docs')
steps:
- name: Trigger Normal tests
run: >
curl -X POST --location "https://circleci.com/api/v2/project/gh/storybookjs/storybook/pipeline" \
-H "Content-Type: application/json" \
-H "Circle-Token: $CIRCLE_CI_TOKEN" \
-d '{
"branch": "'"$BRANCH"'",
"parameters": {
"workflow": "docs"
}
}'
env:
CIRCLE_CI_TOKEN: ${{ secrets.CIRCLE_CI_TOKEN }}
BRANCH: ${{ needs.get-branch.outputs.branch }}
trigger-merged-tests:
runs-on: ubuntu-latest
needs: get-branch
Expand Down
2 changes: 1 addition & 1 deletion scripts/dangerfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const Versions = {
MAJOR: 'MAJOR',
};

const ciLabels = ['ci:normal', 'ci:merged', 'ci:daily'];
const ciLabels = ['ci:normal', 'ci:merged', 'ci:daily', 'ci:docs'];

const branchVersion = Versions.MINOR;

Expand Down

0 comments on commit eead744

Please sign in to comment.