Skip to content

Fetch Remote Assets #1963

Fetch Remote Assets

Fetch Remote Assets #1963

name: Fetch Remote Assets
on:
workflow_dispatch:
schedule:
- cron: '00 00 * * *'
permissions:
contents: write
env:
BRANCH: fetch-includes
jobs:
fetch:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: true
token: ${{ secrets.NESI_PAT }}
- name: Configure Git
run: |
git config user.name "nesi-mkdocs-bot"
git config user.email "bots-mkdocs@nesi.org.nz"
- name: Fetch remote assets
run: bash .github/fetch_includes.sh
- name: Commit if Changes
id: changes
run: |
if git diff --quiet -- . ':(exclude)*.ics'; then
echo "no changes"
else
git add -A
git commit -m "Automatic asset update ($(date +'%c'))"
git push origin main
fi