Skip to content

Fetch and Beautify Fortnite Festival Content API #71

Fetch and Beautify Fortnite Festival Content API

Fetch and Beautify Fortnite Festival Content API #71

Workflow file for this run

name: Fetch and Beautify Fortnite Festival Content API
on:
schedule:
- cron: '5 0 * * *'
- cron: '35 13 * * 4'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests
- name: Run script
run: python fetch_and_reformat.py
- name: Check for changes
id: check_changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .
if git diff-index --quiet HEAD; then
echo "changes=false" >> $GITHUB_OUTPUT
else
echo "changes=true" >> $GITHUB_OUTPUT
fi
- name: Commit and push changes
if: steps.check_changes.outputs.changes == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git commit -m 'Update API'
git push