Skip to content

Commit

Permalink
updated workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
shravanngoswamii authored Jun 24, 2024
1 parent 3d0a6e3 commit 9ee5367
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/DocsNav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 9ee5367

Please sign in to comment.