Generate Data Member in Json #77
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: 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 and commit it | |
run: | | |
python ./scripts/script.py | |
mkdir -p /tmp/data | |
cp ./scripts/dataMember.json /tmp/data/dataMember.json | |
git checkout -b production | |
git fetch | |
git pull --rebase origin production | |
cp /tmp/data/dataMember.json ./data/dataMember.json` | |
git config --global user.email "alifnaufalyasin@gmail.com" | |
git config --global user.name " Alif Naufal" | |
git add . | |
git commit -m "Commit changes from GitHub Actions" | |
- name: Push changes | |
run: | | |
git push origin production | |