Merge pull request #20 from eyeinsky/master #5
This file contains hidden or 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: Generate xml 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://www.offlineimap.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 }}" | |
| # TODO: fix the generate-sitemap to crawl the files as if it was the website. | |
| # it's including inaccessible files ending in .html and not including menu links. | |
| # - name: Commit and push | |
| # run: | | |
| # if [[ `git status --porcelain sitemap.xml` ]]; then | |
| # git config --global user.name 'Chris Coleman' | |
| # git config --global user.email '[email protected]' | |
| # git add sitemap.xml | |
| # git commit -m "Automated sitemap update" sitemap.xml | |
| # git push | |
| # fi |