Skip to content

Commit

Permalink
optimize commands to get only the branch changes
Browse files Browse the repository at this point in the history
  • Loading branch information
manuellysuzik authored Aug 7, 2023
1 parent 297357d commit 6b13f10
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/mkdocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,16 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Git Setup
- name: Update Gitlab Documentation
run: |
LATEST_TAG=$(git rev-parse $GITHUB_REF)
BRANCH_NAME="documentation-ref_$LATEST_TAG"
git config user.name ${{ secrets.GITLAB_USER }}
git config user.email ${{ secrets.GITLAB_EMAIL }}
git remote set-url origin ${{ secrets.GITLAB_DOC_URL }}
- name: Update Gitlab Documentation
run: |
LATEST_TAG=$(git describe --tags --always --abbrev=0)
BRANCH_NAME="documentation-ref_$LATEST_TAG"
git checkout -b $BRANCH_NAME
git cherry-pick -n $LATEST_TAG
git reset --hard HEAD
git add \*.md docs/
git commit --allow-empty -m "Created by $GITHUB_ACTOR"
git push origin $BRANCH_NAME

0 comments on commit 6b13f10

Please sign in to comment.