Fetch GrandTheatreQuebec Events #3
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 GrandTheatreQuebec Events | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 4 * * 1' | |
jobs: | |
fetch-data: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fetch data using artsdata pipeline action | |
uses: culturecreates/artsdata-pipeline-action@v2 | |
with: | |
mode: "fetch" | |
downloadFile: "grandtheatrequebec-events.jsonld" | |
page-url: "https://grandtheatre.qc.ca/programmation/" | |
entity-identifier: "article.show a" | |
token: "${{ secrets.GITHUB_TOKEN }}" | |
add-concepts-and-perform-sparql-transformations: | |
runs-on: ubuntu-latest | |
needs: fetch-data | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Add concepts | |
run: | | |
bundle exec ruby src/add_concepts.rb | |
- name: Perform SPARQL transformations | |
run: | | |
bundle exec ruby src/sparql_transformations.rb | |
- 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/grandtheatrequebec-events-with-concept-and-eventseries.jsonld" | |
git commit -m "Add data generated by the script" | |
git push | |
import-to-artsdata: | |
runs-on: ubuntu-latest | |
needs: add-concepts-and-perform-sparql-transformations | |
steps: | |
- name: Import data using artsdata pipeline action | |
uses: culturecreates/artsdata-pipeline-action@v2 | |
with: | |
artifact: "derived-grandtheatrequebec-ca" | |
publisher: "${{ secrets.PUBLISHER_URI_GREGORY }}" | |
downloadUrl: "https://raw.githubusercontent.com/culturecreates/artsdata-planet-gtq/refs/heads/main/output/grandtheatrequebec-events-with-concept-and-eventseries.jsonld" | |