Skip to content

Commit

Permalink
fixed errors
Browse files Browse the repository at this point in the history
  • Loading branch information
shravanngoswamii committed Oct 5, 2024
1 parent a3e4412 commit c7448ee
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ inputs:
description: 'Comma-separated list of paths to exclude from navbar insertion.'
required: false
default: ''
github-token:
description: 'GitHub token for authentication'
required: true
runs:
using: "composite"
steps:
Expand All @@ -16,22 +19,20 @@ runs:
with:
ref: gh-pages
fetch-depth: 0

- name: Configure Git
run: |
git config user.name github-actions[bot]
git config user.email github-actions[bot]@users.noreply.github.com
shell: bash

- name: Update Navbar
run: |
chmod +x scripts/insert_navbar.sh
./scripts/insert_navbar.sh . "${{ inputs.navbar-url }}" --exclude "${{ inputs.exclude-paths }}"
chmod +x ${{ github.action_path }}/scripts/insert_navbar.sh
${{ github.action_path }}/scripts/insert_navbar.sh . "${{ inputs.navbar-url }}" --exclude "${{ inputs.exclude-paths }}"
if [[ -n $(git status -s) ]]; then
git add .
git commit -m "Added navbar using insert_navbar.sh"
git push "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git" gh-pages
git push "https://${{ github.actor }}:${{ inputs.github-token }}@github.com/${{ github.repository }}.git" gh-pages
else
echo "No changes to commit"
fi
shell: bash
shell: bash

0 comments on commit c7448ee

Please sign in to comment.