Skip to content

Daily sitemap checks #135

Daily sitemap checks

Daily sitemap checks #135

Workflow file for this run

name: Daily sitemap checks
on:
schedule:
- cron: '0 0 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m venv venv
pip install -r workflows/actions/sitemapcheck/requirements.txt
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%dT%H%M')"
- name: Run Python script
run: |
python workflows/actions/sitemapcheck/check_sitemap_loop.py -s https://raw.githubusercontent.com/iodepo/odis-arch/schema-dev/config/sources.yaml -f workflows/output/${{ steps.date.outputs.date }}_sitemaps.csv
- name: Add new file to Git
run: |
git config --global user.email "github-actions@example.com"
git config --global user.name "GitHub Actions"
git add workflows/output/${{ steps.date.outputs.date }}_sitemaps.csv
git commit -m "Updating sitemap testing output directory"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}