From 92d750e2f4796a901508f2b6fcc07131541f52ac Mon Sep 17 00:00:00 2001 From: PJ568 Date: Sun, 18 Jun 2023 15:07:19 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8sitemap=E7=94=9F=E6=88=90?= =?UTF-8?q?=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/create_sitemap.yml | 28 ++++++++++++++++++++++++++++ .github/workflows/push_sitemap.yml | 16 ++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 .github/workflows/create_sitemap.yml create mode 100644 .github/workflows/push_sitemap.yml diff --git a/.github/workflows/create_sitemap.yml b/.github/workflows/create_sitemap.yml new file mode 100644 index 00000000..98c5ea93 --- /dev/null +++ b/.github/workflows/create_sitemap.yml @@ -0,0 +1,28 @@ +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 the sitemap + id: sitemap + uses: cicirello/generate-sitemap@v1 + with: + base-url-path: https://tools.pj568.eu.org/ + + - 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 }}" diff --git a/.github/workflows/push_sitemap.yml b/.github/workflows/push_sitemap.yml new file mode 100644 index 00000000..66bebff3 --- /dev/null +++ b/.github/workflows/push_sitemap.yml @@ -0,0 +1,16 @@ +# workflow to summit Sitemap to google, etc. + +name: Submit Sitemap + +on: + push: + branches: + - main + +jobs: + submit: + runs-on: ubuntu-latest + + steps: + - name: Ping Google + run: curl https://www.google.com/ping?sitemap=https://Tools.PJ568.eu.org/sitemap.xml \ No newline at end of file