Skip to content

Update generate-sitemap.yml #3

Update generate-sitemap.yml

Update generate-sitemap.yml #3

name: Generate Dynamic Sitemap
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
jobs:
generate-sitemap:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install Dependencies
run: npm install sitemap-generator-cli
- name: Generate Sitemap
run: npx sitemap-generator-cli https://multiverse-dataverse.netlify.app/ -o Documentation/sitemap.md
- name: List Files
run: ls -la
- name: Configure Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Pull Latest Changes
run: git pull origin main --rebase
- name: Commit and Push Sitemap
run: |
git add sitemap.md
git commit -m "Update Sitemap [skip ci]" || echo "No changes to commit"
git push