Skip to content

Commit

Permalink
Update sitemap-generator.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
lucthienphong1120 authored Dec 28, 2023
1 parent 353c7e7 commit fcd1ac2
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/sitemap-generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,21 @@ jobs:

steps:
- name: Checkout the repo
uses: actions/checkout@v4
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Generate the sitemap
id: sitemap
uses: cicirello/generate-sitemap@v1
with:
base-url-path: https://education.crfnetwork.com/
include-pdf: true

- name: Output stats
- name: Commit and push
run: |
echo "sitemap-path = ${{ steps.sitemap.outputs.sitemap-path }}"
echo "url-count = ${{ steps.sitemap.outputs.url-count }}"
echo "excluded-count = ${{ steps.sitemap.outputs.excluded-count }}"
if [[ `git status --porcelain sitemap.xml` ]]; then
git config --global user.name 'github-actions'
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
git add sitemap.xml
git commit -m "Automated sitemap update" sitemap.xml
git push
fi

0 comments on commit fcd1ac2

Please sign in to comment.