Merge pull request #13 from NotAShelf/funny-ci #4
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: Generate Archives | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
create-archives: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Create archives | |
run: | | |
mkdir -p archives | |
for dir in wallpapers/*/; do | |
base=$(basename "$dir") | |
if [ "$base" != "unorganized" ]; then | |
zip -r "archives/${base}.zip" "$dir" | |
fi | |
done | |
- name: Upload to gh-pages | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./archives |