Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace the_od_bods data on pipeline run #3

Merged
merged 5 commits into from
Jan 26, 2023
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 24 additions & 11 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
with:
repository: 'OpenDataScotland/the_od_bods'
path: 'the_od_bods'
token: ${{ secrets.REPO_COMMIT_TOKEN }}
- name: Check out JKAN repo
uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -72,12 +73,12 @@ jobs:
# USMART portals
- name: Run Script usmart.py
run: python ./usmart.py
working-directory: ${{env.odbodsPath}}
working-directory: ${{env.odbodsPath}}

- name: Run Script ckan.py
run: python ./ckan.py
working-directory: ${{env.odbodsPath}}

# ScotGov Statistics Sparkql
- name: Run Script sparkql_statistics.py
run: python ./sparkql_statistics.py
Expand All @@ -102,12 +103,12 @@ jobs:
- name: Run Script moray_council_scraper.py
run: python ./moray_council_scraper.py
working-directory: ${{env.odbodsPath}}/web-scrapers

# National Library of Scotland feeds
- name: Run Script nls_scraper.py
run: python ./nls_scraper.py
working-directory: ${{env.odbodsPath}}/web-scrapers

# Merge data
- name: Run Script merge_data.py
run: python ./merge_data.py
Expand All @@ -119,18 +120,30 @@ jobs:
working-directory: ${{env.odbodsPath}}

# Commit changes
- name: Git config
- name: Git config JKAN
working-directory: ${{env.jkanPath}}
run: |
git config user.name "GitHub Actions"
git config user.email "<>"
- name: Git status
git config user.name 'GitHub Actions'
git config user.email '<>'
- name: Git status JKAN
run: git status
working-directory: ${{env.jkanPath}}
- name: Commit and push
- name: Commit and push JKAN
if: ${{ github.event.inputs.commitToSite == 'true' || github.event.schedule == '0 12 * * FRI' }}
run: git add -A && git commit -m "Dataset Sync" && git push origin gh-pages
run: git add -A && git commit -m 'Dataset Sync' && git push origin gh-pages
working-directory: ${{env.jkanPath}}
- name: Git config the_od_bods
working-directory: ${{env.odbodsPath}}
run: |
git config user.name "GitHub Actions"
git config user.email "<>"
- name: Git status the_od_bods
run: git status
working-directory: ${{env.odbodsPath}}
- name: Commit and push the_od_bods
if: ${{ github.event.inputs.commitToSite == 'true' || github.event.schedule == '0 12 * * FRI' }}
run: git add data && git commit -m "Dataset Sync" && git push origin main
working-directory: ${{env.odbodsPath}}

# Tell the Slack channel!
- name: Slack Notification
Expand Down