Skip to content

Fetch IPAA artists and organizations using sitemap #13

Fetch IPAA artists and organizations using sitemap

Fetch IPAA artists and organizations using sitemap #13

name: Fetch IPAA artists and organizations using sitemap
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 sitemap_scraping.rb \
https://ipaa.ca/open-data.xml \
output/entities.jsonld
- name: Commit and Push Changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git add "output/entities.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: ipaa-entities
publisher: "${{ secrets.PUBLISHER_URI_GREGORY }}"
downloadUrl: "https://raw.githubusercontent.com/culturecreates/artsdata-planet-ipaa/${{ needs.fetch-and-commit-data.outputs.commit-hash }}/output/entities.jsonld"
group: "artsdata-planet-ipaa"