some playlists 2 (#427) #1649
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
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: '0 0 * * *' # @daily | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout mackorone/spotify-playlist-archive-src | |
uses: actions/checkout@v4 | |
with: | |
repository: mackorone/spotify-playlist-archive-src | |
path: spotify-playlist-archive-src | |
submodules: recursive | |
- name: Checkout mackorone/spotify-playlist-archive | |
uses: actions/checkout@v4 | |
with: | |
repository: mackorone/spotify-playlist-archive | |
path: spotify-playlist-archive | |
# Also fetch the second-to-last commit so the script can determine, | |
# via git commands, which files changed in the most recent commit | |
fetch-depth: 2 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
working-directory: spotify-playlist-archive-src | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements/requirements.txt | |
- name: Run script | |
working-directory: spotify-playlist-archive | |
env: | |
SPOTIFY_CLIENT_ID: ${{ secrets.SPOTIFY_CLIENT_ID }} | |
SPOTIFY_CLIENT_SECRET: ${{ secrets.SPOTIFY_CLIENT_SECRET }} | |
run: > | |
python $GITHUB_WORKSPACE/spotify-playlist-archive-src/src/main.py | |
--playlists-dir playlists --commit-and-push --auto-register |