From 42ebe9073e83e0b79f3b029410c477695db4ef1a Mon Sep 17 00:00:00 2001 From: Der_Googler <54764558+DerGoogler@users.noreply.github.com> Date: Fri, 23 Feb 2024 10:21:07 +0100 Subject: [PATCH] Create sitemap.yml --- .github/workflows/sitemap.yml | 41 +++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/sitemap.yml diff --git a/.github/workflows/sitemap.yml b/.github/workflows/sitemap.yml new file mode 100644 index 0000000..4a8c8e6 --- /dev/null +++ b/.github/workflows/sitemap.yml @@ -0,0 +1,41 @@ +name: Generate API sitemap + +on: + push: + branches: [ master ] + +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 the sitemap + id: sitemap + uses: cicirello/generate-sitemap@v1 + with: + base-url-path: https://mmrl.dergoogler.com/?module= + path-to-root: modules + sitemap-format: xml + + - name: Output stats + 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 }}" + + - name: Setup Git + run: | + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + + - name: Commit Changes + run: | + git add . + git commit -m "Update Sitemap" || true + git push || true