-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (45 loc) · 1.46 KB
/
nac-sitemap-entities.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Fetch NAC entities
on:
workflow_dispatch:
schedule:
- cron: '0 4 * * 2'
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/sitemap_scraping.rb \
https://nac-cna.ca/en/site/sitemap-ssl \
output/entities.jsonld
- 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/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: nac-events
publisher: "${{ secrets.PUBLISHER_URI_GREGORY }}"
downloadUrl: https://raw.githubusercontent.com/culturecreates/artsdata-planet-nac/${{ needs.fetch-and-commit-data.outputs.commit-hash }}/output/entities.jsonld