Skip to content

Workflow file for this run

name: Update Contentful data on release
on:
push:
branches:
- master
schedule:
- cron: '0 */1 * * *'
branches:
- master
jobs:
fetch-data:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Fetch Contentful data
run: SPACE_ID=${{secrets.CONTENTFUL_SPACE_ID}} ACCESS_TOKEN=${{secrets.CONTENTFUL_ACCESS_TOKEN}} node ./contentful.js
- name: Commit to GitHub
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
git add contentfulEntries.json
git commit -m "Update Contentful data" || echo "Nothing to commit"
git push --no-verify