Update Members #41
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Members | |
on: | |
workflow_dispatch: # This enables manual triggering from the GitHub UI | |
jobs: | |
update-legislation-info: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
MEMBERS_INFO: ${{ secrets.MEMBERS_INFO }} | |
GEOCODER_KEY: ${{ secrets.GEOCODER_KEY }} | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' # Specify the Python version if needed | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt # If you have dependencies | |
- name: Run members geocoder script | |
run: python scripts/members_geocoder.py | |
- name: Commit and push if changes | |
run: | | |
# Set up Git to use the GITHUB_TOKEN for authentication | |
git config --local user.email "[email protected]" | |
git config --local user.name "bot" | |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | |
# Git commands to add, commit, and push | |
git add 'public/rtc_members.geo.json' 'public/address_cache.csv' "public/airtable.pkl" "public/nongeocoded_members.csv" | |
git commit -m "Update RTC member files" || echo "No changes to commit" | |
git push |