Skip to content

Commit

Permalink
Update cd_pipeline.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
arpita0911patel authored May 30, 2024
1 parent 197f01a commit 285e6a3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/cd_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,25 +88,24 @@ jobs:
- name: Create a new branch for the changes
working-directory: gh-pages
run: |
export BRANCH_NAME=deploy-branch-$(date +%Y%m%d-%H%M%S)
git checkout -b $BRANCH_NAME
git checkout -b deploy-branch-$VERSION
git add .
git commit -m "Deploy from CI workflow artifact"
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
- name: Push changes to new branch
working-directory: gh-pages
env:
PERSONAL_ACCESS_TOKEN: ${{ secrets.SECRET_TO_PUSH_TO_CIROH_GITHUB_IO }}
run: |
git push --set-upstream origin $(echo $GITHUB_ENV | grep BRANCH_NAME | cut -d'=' -f2)
git push --set-upstream origin deploy-branch-$VERSION
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.SECRET_TO_PUSH_TO_CIROH_GITHUB_IO }}
commit-message: "Deploy from CI workflow artifact"
branch: ${{ env.BRANCH_NAME }}
branch: deploy-branch-$VERSION
title: "Deploy from CI"
body: "This is an automated PR to deploy changes from CI workflow."
base: main
Expand Down

0 comments on commit 285e6a3

Please sign in to comment.