update workflow #10
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: Generate Data Member in Json | |
on: | |
push: | |
branches: [master] | |
workflow_dispatch: | |
jobs: | |
generate_data_member: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Download csv file of member form in gsheet | |
run: | | |
curl -L -o ./scripts/dataMember.csv https://docs.google.com/spreadsheets/d/1SaXnuRt-1KXyDGS18KqU7cus4_IWNxpGhiVy0J1vz-U/export?format=csv | |
- name: run python script to convert csv to json | |
run: | | |
cd ./scripts | |
python script.py | |
git checkout -b production | |
git fetch | |
cp ./dataMember.json ../data/dataMember.json | |
git add ./data/dataMember.json | |
# Commit the changes | |
- name: Commit changes | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git commit -m "Update data member from GitHub Action" || true | |
git push origin production | |