Update #170
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
# Simple workflow for deploying static content to GitHub Pages | |
name: Update | |
on: | |
schedule: | |
- cron: 0 12 * * * | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
# Allow one concurrent deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
# Single deploy job since we're just deploying | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Download IA | |
id: vars | |
run: curl -LOs https://archive.org/download/ia-pex/ia | |
- name: Set IA executable | |
run: chmod +x ia | |
- name: Delete thumb_list.txt | |
run: rm thumb_list.txt | |
- name: Commit to the repo | |
run: | | |
git config --global user.name "fullpwnmediabot" | |
git config --global user.email "[email protected]" | |
git add . | |
# "echo" returns true so the build succeeds, even if no changed files | |
git commit -m 'Daily Thumbnail Update' || echo | |
git push | |
env: | |
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
EXCLUDED: ${{ secrets.EXCLUDED }} | |
EXCLUDED_LANGS: ${{ secrets.EXCLUDED_LANGS }} | |
EXCLUDE_FORKED_REPOS: fals | |
- name: Download Thumbnails | |
run: ./ia list abc-dump-20-02-2023 --glob="*.jpg" > thumb_list.txt | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
# Upload entire repository | |
path: '.' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 | |
- name: Commit to the repo | |
run: | | |
git config --global user.name "fullpwnmediabot" | |
git config --global user.email "[email protected]" | |
git add . | |
# "echo" returns true so the build succeeds, even if no changed files | |
git commit -m 'Daily Thumbnail Update' || echo | |
git push | |
env: | |
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
EXCLUDED: ${{ secrets.EXCLUDED }} | |
EXCLUDED_LANGS: ${{ secrets.EXCLUDED_LANGS }} | |
EXCLUDE_FORKED_REPOS: false |