Skip to content

Generate

Generate #468

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Generate
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
schedule:
- cron: '0 0 */3 * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
generate:
runs-on: ubuntu-latest
env:
OUTPUT_DIR: ../spotify-stats-jbrown1618
SPOTIPY_CLIENT_ID: ${{ secrets.SPOTIPY_CLIENT_ID }}
SPOTIPY_CLIENT_SECRET: ${{ secrets.SPOTIPY_CLIENT_SECRET }}
steps:
- uses: actions/checkout@v3
with:
path: spotify-stats-jbrown1618
- uses: actions/checkout@v3
with:
repository: jbrown1618/spotify-stats
path: spotify-stats
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: 'Run spotify-stats and commit changes'
run: |
cd ./spotify-stats
pip install -r requirements.txt
echo '${{ secrets.SPOTIPY_CACHE }}' > .cache
python main.py
echo 'Finished running spotify-stats'
cd ../spotify-stats-jbrown1618
git config --global user.name 'Josh Brown'
git config --global user.email '[email protected]'
git add -A
git commit -m '[Automated] Update with latest data'
git push