Skip to content
This repository has been archived by the owner on Dec 10, 2023. It is now read-only.

fix(anime.yml): copy the script to /tmp #33

Merged
merged 2 commits into from
Aug 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/anime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,12 @@ jobs:

- name: Change the branch
run: |
cp photo/anime.py /tmp
git checkout -B media/cover
rm -rf *
git checkout aurora

- name: Pull a random cover from ur Pinterest
run: |
cd photo
python anime.py "${{ secrets.PINTEREST_EMAIL }}" "${{ secrets.PINTEREST_PASSWORD }}" "${{ secrets.PINTEREST_USERNAME }}"
run: python /tmp/anime.py "${{ secrets.PINTEREST_EMAIL }}" "${{ secrets.PINTEREST_PASSWORD }}" "${{ secrets.PINTEREST_USERNAME }}"

- name: Commit new cover
run: |
Expand Down
6 changes: 3 additions & 3 deletions photo/anime.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
pins = pinterest.board_feed(board_id=animeBoardId)

# The directory where the image will be saved.
saveDir = "../img/"
saveDir = "./img/"

# The cache directory.
cacheDir = "cache/"
cacheDir = "./cache/"

while len(pins) > 2:
# Get random pin
Expand Down Expand Up @@ -92,4 +92,4 @@
# Break the loop
break

print("Done")
print("Done.")