updated sih link #16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate XML Sitemap | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
sitemap_job: | |
runs-on: ubuntu-latest | |
name: Generate a sitemap | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Generate Sitemap | |
uses: cicirello/[email protected] | |
with: | |
path-to-root: . # Optional, defaults to entire repo | |
base-url-path: https://sanchit.cc/ # Update to your site's URL | |
include-html: true | |
include-pdf: true | |
sitemap-format: xml | |
additional-extensions: '' | |
drop-html-extension: false | |
date-only: false | |
exclude-paths: '' | |
- name: Commit and push | |
run: | | |
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" | |
git push | |
fi |