Fetch Scenesfrancophones Events #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Fetch Scenesfrancophones Events | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 5 * * 1" # Run at 1:00 AM ET every Monday | |
jobs: | |
fetch-and-commit-data: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Run Main Script | |
run: bundle exec ruby main.rb https://scenesfrancophones.ca/spectacles?page= https://scenesfrancophones.ca div.title output/events.jsonld | |
- name: Commit and Push Changes | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Actions" | |
git pull | |
git add "output/events.jsonld" | |
git commit -m "Add data generated by the script" | |
git push | |
artsdata-push: | |
runs-on: ubuntu-latest | |
needs: fetch-and-commit-data | |
steps: | |
- name: Action setup | |
uses: culturecreates/[email protected] | |
with: | |
artifact: scenesfrancophones-events | |
publisher: "${{ secrets.PUBLISHER_URI_GREGORY }}" | |
downloadUrl: "https://raw.githubusercontent.com/culturecreates/artsdata-planet-scenesfrancophones/main/output/events.jsonld" |