Merge branch 'main' of github.com:bulgariamitko/flutterflowtutorials #257
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: Run Python Script | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
run_script: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Node.js 16 | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install google-api-python-client | |
- name: Run Python script | |
run: | | |
python --version | |
pwd | |
ls | |
python extract-data.py | |
working-directory: ${{ github.workspace }} | |
env: | |
YOUTUBE_API_KEY: ${{ secrets.YOUTUBE_API_KEY }} | |
- name: Commit and push changes | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add . | |
git commit -m "Update data.json from GitHub Action" || echo "No changes to commit" | |
git push |