-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow for pull request draft builds
- Loading branch information
Showing
1 changed file
with
5 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,6 @@ | ||
name: Dispatch Deploy to GitHub Pages | ||
name: Deploy Draft | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
- 'stage' | ||
# Add additional content source branches here | ||
pull_request: | ||
branches: | ||
- '*' | ||
|
@@ -20,7 +15,7 @@ jobs: | |
run: | | ||
if [ "${{ github.event_name }}" == "pull_request" ]; then | ||
# If this workflow is kicked off by a pull request, build | ||
# a draft using the pull resource base branch and PR branch. | ||
# a draft using the pull request base branch and PR branch. | ||
build_branch="${{ github.base_ref }}" | ||
draft_branch="${{ github.event.pull_request.head.ref }}" | ||
else | ||
|
@@ -39,12 +34,12 @@ jobs: | |
echo "draft_branch=$draft_branch" >> $GITHUB_OUTPUT | ||
id: branches | ||
|
||
- name: Dispatch Deploy to GitHub Pages | ||
- name: Deploy Draft | ||
uses: convictional/[email protected] | ||
with: | ||
owner: riptano | ||
repo: datastax-docs-site | ||
github_token: ${{ secrets.DISPATCH_GITHUB_TOKEN }} | ||
github_user: mlr | ||
workflow_file_name: gh-pages-build.yml | ||
github_user: ${{ secrets.DISPATCH_GITHUB_USER }} | ||
workflow_file_name: deploy-draft.yml | ||
client_payload: '{ "build_repository": "${{ github.event.repository.full_name }}", "build_branch": "${{ steps.branches.outputs.build_branch }}", "draft_branch": "${{ steps.branches.outputs.draft_branch }}", "pull_request_number": "${{ github.event.pull_request.number }}" }' |