Skip to content

Commit

Permalink
added spactart.com workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
saumier committed May 14, 2024
1 parent df5f0f6 commit 633818c
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/spec-qc-ca-events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Fetch spec.qc.ca Events
on:
workflow_dispatch:
schedule:
- cron: '0 0 1 * *'
- cron: '0 7 * * 3'
jobs:
fetch-and-commit-data:
runs-on: ubuntu-latest
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/spectart-com-events.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Fetch spec.qc.ca Events

on:
workflow_dispatch:
schedule:
- cron: '0 6 * * 3'
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://spectart.com/programmation/ \
"a.thumbnail" \
output/spectart-com-events.jsonld \
false
- 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/spectart-com-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: spectart-com-events
publisher: "${{ secrets.PUBLISHER_URI_GREGORY }}"
downloadUrl: https://raw.githubusercontent.com/culturecreates/artsdata-orion/${{ needs.fetch-and-commit-data.outputs.commit-hash }}/output/spectart-com-events.jsonld

0 comments on commit 633818c

Please sign in to comment.