Merge pull request #2 from Neutx/imgbot #8
Workflow file for this run
This file contains 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: Update Sitemap | |
on: | |
push: | |
branches: | |
- master # Change this to your default branch if needed | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Update XML Sitemap | |
run: | | |
echo '<?xml version="1.0" encoding="UTF-8"?>' > sitemap.xml | |
echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' >> sitemap.xml | |
echo ' <url>' >> sitemap.xml | |
echo ' <loc>https://adilparwez.live</loc>' >> sitemap.xml | |
echo ' <lastmod>'$(date -u +"%Y-%m-%dT%H:%M:%SZ")'</lastmod>' >> sitemap.xml | |
echo ' <changefreq>monthly</changefreq>' >> sitemap.xml | |
echo ' <priority>0.5</priority>' >> sitemap.xml | |
echo ' </url>' >> sitemap.xml | |
echo '</urlset>' >> sitemap.xml | |
git config user.name 'GitHub Actions' | |
git config user.email '[email protected]' | |
git add sitemap.xml | |
git commit -m "Update sitemap.xml" | |
git push | |
env: | |
GH_TOKEN: ${{ secrets.TOKEN }} |