From a74b76e8af004bb2120f1e7cf0c1544ab0713d2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Portas=20L=C3=B3pez?= <81629707+TeenBiscuits@users.noreply.github.com> Date: Sat, 16 Nov 2024 19:36:38 +0100 Subject: [PATCH] =?UTF-8?q?A=C3=B1adido=20workflow=20para=20Indexaci=C3=B3?= =?UTF-8?q?n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/indexing.yml | 61 ++++++++++++++++++++++++++++++++++ LICENSES/MIT.txt | 9 +++++ 2 files changed, 70 insertions(+) create mode 100644 .github/workflows/indexing.yml create mode 100644 LICENSES/MIT.txt diff --git a/.github/workflows/indexing.yml b/.github/workflows/indexing.yml new file mode 100644 index 0000000..ed699e2 --- /dev/null +++ b/.github/workflows/indexing.yml @@ -0,0 +1,61 @@ +name: 🔎 Indexación en motores de búsqueda + +on: + push: + branches: ["main"] + workflow_dispatch: + +jobs: + wait-for-vercel-deployment: + name: 🔼 Esperar el deploy en Vercel + if: github.repository == 'TeenBiscuits/Pasame-Codigo' + runs-on: ubuntu-latest + steps: + - name: ⌛ Esperar deploy + # Unly + # MIT + # https://github.com/UnlyEd/github-action-await-vercel + uses: UnlyEd/github-action-await-vercel@v1 + id: await-vercel + env: + VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} + with: + deployment-url: pc.pablopl.dev + timeout: 10 + poll-interval: 1 + + - name: Display deployment status + run: "echo The deployment at ${{ fromJson(steps.await-vercel.outputs.deploymentDetails).url }} is ${{ fromJson(steps.await-vercel.outputs.deploymentDetails).readyState }}" + + indexnow: + name: 🔎 Bing IndexNow + if: github.repository == 'TeenBiscuits/Pasame-Codigo' + needs: [wait-for-vercel-deployment] + runs-on: ubuntu-latest + steps: + - name: ⬆️ Subir Sitemap + # Bojie Yang + # MIT + # https://github.com/bojieyang/indexnow-action + uses: bojieyang/indexnow-action@v2 + with: + sitemap-location: 'https://pc.pablopl.dev/sitemap-index.xml' + key: ${{ secrets.INDEXNOW_KEY }} + key-location: 'https://pc.pablopl.dev/${{ secrets.INDEXNOW_KEY }}.txt' + endpoint: www.bing.com # Es el default + failure-strategy: error + + google-indexing: + name: 🔎 Google Index + if: github.repository == 'TeenBiscuits/Pasame-Codigo' + needs: [wait-for-vercel-deployment] + runs-on: ubuntu-latest + steps: + - name: ⬆️ Subir Urls + # Robin Genz + # MIT + # https://github.com/robingenz/google-indexing-action + uses: robingenz/action-google-indexing@v1 + with: + siteUrl: 'pc.pablopl.dev' + gcpServiceAccountKey: ${{ secrets.GCP_SA_KEY }} \ No newline at end of file diff --git a/LICENSES/MIT.txt b/LICENSES/MIT.txt new file mode 100644 index 0000000..2071b23 --- /dev/null +++ b/LICENSES/MIT.txt @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.