Fetch Scenesfrancophones Artists #5
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 Artists | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 1 * *' #run every month first day | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Set up Ruby | |
uses: actions/setup-ruby@v1 | |
with: | |
ruby-version: '3.1' | |
- run: bundle install | |
- name: Run Main Script | |
run: ruby main.rb https://scenesfrancophones.ca/artistes?page= https://scenesfrancophones.ca article.node.node--promoted.artiste.artiste--teaser.card output/artists.jsonld | |
- name: Commit and Push Changes | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Actions" | |
git add "output/artists.jsonld" | |
git commit -m "Add data generated by the script" | |
git push | |
- name: Call Artsdata Workflow | |
uses: peter-evans/repository-dispatch@v2 | |
with: | |
token: ${{secrets.PAT}} | |
event-type: trigger-artists-artsdata-push |