Skip to content

Update Sitemap

Update Sitemap #114

name: Update Sitemap
on:
schedule:
# # At 18:30 UTC on Sunday (12.00 mid night in Sri Lanka)
# - cron: "30 18 * * 0"
# At minute 0 past every two hours
# - cron: "0 */2 * * *"
# # At 18:30 UTC on everyday (12.00 mid night in Sri Lanka)
# - cron: "30 18 * * *"
# # At 18:30 UTC (12.00 mid night in Sri Lanka) on Sunday
- cron: "30 18 * * 0"
# Enables a button on Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
with:
ref: master
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
pip install requests
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run the Python script
run: |
cd scripts
python github_pages.py
- name: Commit and push into the master branch
run: |
git config user.name github-actions
git config user.email [email protected]
git add --all
git commit -m "Site build using GitHub Actions" || echo "No changes on Projects and Publications"
git push