Generate Sitemap #11
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 Sitemap | |
| on: | |
| push: | |
| branches: | |
| - main | |
| schedule: | |
| - cron: '0 0 * * 0' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| sitemap: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Generate sitemap.xml | |
| uses: cicirello/generate-sitemap@v1 | |
| with: | |
| base-url-path: https://lg-leo.github.io/IG0606ADD-with-CAM-coursebook-NOTE/ | |
| include-html: true | |
| include-pdf: true | |
| additional-extensions: "md" | |
| drop-html-extension: false | |
| - name: Commit and push changes | |
| run: | | |
| git config --global user.name 'github-actions[bot]' | |
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
| git add sitemap.xml | |
| git diff --staged --quiet || git commit -m "Auto-generate sitemap" | |
| git push |