put thing in thing #29
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: Upload to GitHub Pages | |
on: | |
push: | |
branches: ["master"] | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install SSG | |
run: sudo apt-get install ruby jekyll | |
- name: Install exiftool | |
run: sudo apt-get install exiftool ruby-mini-exiftool webp | |
- name: Setup Pages | |
id: pages | |
uses: actions/configure-pages@v5 | |
- name: Checkout photos | |
uses: actions/checkout@v4 | |
with: | |
repository: 's7uck/photos' | |
path: './photos' | |
- name: Build site | |
# Outputs to the './_site' directory by default | |
run: jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" | |
env: | |
JEKYLL_ENV: production | |
- name: Create compressed versions of each photo | |
working-directory: './photos' | |
run: find photos | parallel -eta cwebp "{}" -o "{.}.webp" -size 524288 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |