Skip to content

Commit

Permalink
Add action
Browse files Browse the repository at this point in the history
  • Loading branch information
vool committed Oct 7, 2024
1 parent 1c9d090 commit c930eb0
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/gallery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish Gallery
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
id-token: write
actions: write
pages: write
jobs:
deploy:
name: Publish Gallery to Github Pages
if: ${{ github.repository != 'gautamkrishnar/github-pages-gallery' && github.event.head_commit.message != '' && github.event.head_commit.message != 'Initial commit' }}
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Build Gallery 🔧
run: docker run -v "$(pwd):/work" ghcr.io/thumbsup/thumbsup /bin/sh -c "cd /work/ && thumbsup --config config.json"
- name: Package and upload artifact 📦
uses: actions/upload-pages-artifact@v3
with:
path: 'build_output'
name: gh-pages
- name: Deploy to Github Pages 🚀
uses: actions/deploy-pages@v4
with:
artifact_name: gh-pages
token: ${{ secrets.GITHUB_TOKEN }}
- name: Delete artifact 🗑️
uses: geekyeggo/delete-artifact@v4
with:
name: gh-pages
13 changes: 13 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"input": "./gallery",
"output": "./build_output",
"title": "Photo Gallery",
"sort-albums-by": "title",
"sort-media-by": "filename",
"download-photos": "copy",
"cleanup": true,
"theme": "cards",
"css": "./custom.css",
"footer": "Copyright Text",
"usage-stats": false
}

0 comments on commit c930eb0

Please sign in to comment.