Skip to content

Commit

Permalink
fix: cleanup docs generation workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammad-Dwairi committed Jul 3, 2024
1 parent 5269941 commit b960d7d
Showing 1 changed file with 20 additions and 13 deletions.
33 changes: 20 additions & 13 deletions .github/workflows/generate-docs-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,19 @@ jobs:
- name: Store and Extract Newly Generated Docs Version Number
run: echo "NEW_DOCS_VERSION=$(jq -r '.version' code/target/dokka/version.json)" >> $GITHUB_ENV

- name: Check New Release Version
run: |
for dir in ${{ runner.temp }}/older/*; do
if [ -d "$dir" ]; then
DIR_NAME=$(basename "$dir")
if [ "$DIR_NAME" == "${{ env.NEW_DOCS_VERSION }}" ]; then
echo "Error: Reference Docs with version ${{env.NEW_DOCS_VERSION }} already exists."
echo "Hint: Make sure to update the project version in the pom.xml file"
exit 1
fi
fi
done
- name: Move Newly Generated Docs to Temporary Workspace
run: mv code/target/dokka ${{ runner.temp }}/${{ env.NEW_DOCS_VERSION }}

Expand Down Expand Up @@ -79,20 +92,14 @@ jobs:
git add .
git commit -m "chore: publishing docs for version ${{ env.NEW_DOCS_VERSION }}"
- name: Upload modified repository content as artifact
uses: actions/upload-artifact@v3
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
name: modified-repo-content
path: ./

# - name: Create Pull Request
# uses: peter-evans/create-pull-request@v6
# with:
# token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
# commit-message: "chore: publishing docs for version ${{ env.NEW_DOCS_VERSION }}"
# body: "This PR adds the reference documentation for version ${{ env.NEW_DOCS_VERSION }}."
# title: "chore: reference docs update for version ${{ env.NEW_DOCS_VERSION }}"
# branch: "docs-update-${{ env.NEW_DOCS_VERSION }}"
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
commit-message: "chore: publishing docs for version ${{ env.NEW_DOCS_VERSION }}"
body: "This PR adds the reference documentation for version ${{ env.NEW_DOCS_VERSION }}."
title: "chore: reference docs update for version ${{ env.NEW_DOCS_VERSION }}"
branch: "docs-update-${{ env.NEW_DOCS_VERSION }}"



Expand Down

0 comments on commit b960d7d

Please sign in to comment.