Skip to content

Commit

Permalink
Added workflow to fetch RCAAQ events
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-aravind committed Feb 14, 2024
1 parent f314482 commit a9923a0
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/rcaaq-events.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Fetch RCAAQ Events

on:
workflow_dispatch:
schedule:
- cron: '0 0 1 */6 *'

jobs:
fetch-and-commit-data:
runs-on: ubuntu-latest
outputs:
commit-hash: ${{ steps.get_commit_hash.outputs.commit-hash }}

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 src/main.rb \
https://reseauartactuel.org/liste_evenements/page/ \
"h3.tribe-events-list-event-title a" \
output/rcaaq-events.jsonld \
true
- 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/rcaaq-events.jsonld"
git commit -m "Add data generated by the script"
git push
- name: Get commit hash
id: get_commit_hash
run: |
commit_hash=$(git rev-parse HEAD)
echo "commit-hash=$commit_hash" >> $GITHUB_OUTPUT
artsdata-push:
runs-on: ubuntu-latest
needs: fetch-and-commit-data
steps:
- name: Action setup
uses: culturecreates/[email protected]
with:
artifact_name: reseauartactuel-org
page_url: https://reseauartactuel.org/liste_evenements/
publisher_uri: "${{ secrets.PUBLISHER_URI_GREGORY }}"
download_uri: https://raw.githubusercontent.com/culturecreates/artsdata-orion/${{ needs.fetch-and-commit-data.outputs.commit-hash }}/output/rcaaq-events.jsonld
download_file: rcaaq-events.jsonld
group: artsdata-orion


0 comments on commit a9923a0

Please sign in to comment.