Skip to content

Instantly share code, notes, and snippets.

@twhite96
Last active February 4, 2023 23:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save twhite96/db4631903d181f75f8ac2bee750a5a6c to your computer and use it in GitHub Desktop.
Save twhite96/db4631903d181f75f8ac2bee750a5a6c to your computer and use it in GitHub Desktop.
Image opt workflow
name: ci
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
name: calibreapp/image-actions
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Compress Images
id: calibre
uses: calibreapp/image-actions@main
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
compressOnly: true
- name: Get specific changed files
id: changed-files-specific
uses: tj-actions/changed-files@v23.1
with:
files: |
**.svg
**.png
**.jpeg
**.webp
files_ignore: |
**.yml
**.md
- name: Run step if only the files listed above change
if: steps.changed-files-specific.outputs.only_changed == 'true'
run: |
echo "Only files listed above have changed."
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.x
- run: pip install mkdocs-material
- run: mkdocs gh-deploy --force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment