From 9ee53676cfc66965f5e896c39544b65b55a9e967 Mon Sep 17 00:00:00 2001 From: Shravan Goswami <123811742+shravanngoswamii@users.noreply.github.com> Date: Mon, 24 Jun 2024 14:36:16 +0000 Subject: [PATCH] updated workflow --- .github/workflows/DocsNav.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/DocsNav.yml b/.github/workflows/DocsNav.yml index a8c5cee2..3a91f0ad 100644 --- a/.github/workflows/DocsNav.yml +++ b/.github/workflows/DocsNav.yml @@ -2,8 +2,8 @@ name: Add Navbar on: workflow_run: - workflows: ["*"] # add workflow names that generates docs in this list like `workflows: ["Docs Workflow", "Previews Workflow]` - types: + workflows: ["Documentation"] # add workflow names that generates docs in this list like `workflows: ["Docs Workflow", "Previews Workflow]` + types: - completed workflow_dispatch: # Allows manual triggering @@ -31,14 +31,17 @@ jobs: run: | git config user.name github-actions[bot] git config user.email github-actions[bot]@users.noreply.github.com - + # Update all HTML files in the current directory (gh-pages root) ./insert_navbar.sh . - + + # Remove the insert_navbar.sh file + rm insert_navbar.sh + # Check if there are any changes if [[ -n $(git status -s) ]]; then git add . - git commit -m "added navbar" + git commit -m "Added navbar and removed insert_navbar.sh" git push "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" gh-pages else echo "No changes to commit"