Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/David-Byrne/jekyll-diff-action
Github Action that diffs the built Jekyll site after a change, and comments the result back to GitHub.
https://github.com/David-Byrne/jekyll-diff-action
ci diff github-actions jekyll
Last synced: 6 days ago
JSON representation
Github Action that diffs the built Jekyll site after a change, and comments the result back to GitHub.
- Host: GitHub
- URL: https://github.com/David-Byrne/jekyll-diff-action
- Owner: David-Byrne
- License: mit
- Created: 2019-11-06T19:12:48.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-20T21:35:01.000Z (over 3 years ago)
- Last Synced: 2024-07-07T05:01:38.954Z (4 months ago)
- Topics: ci, diff, github-actions, jekyll
- Language: Shell
- Homepage:
- Size: 13.7 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-actions - Jekyll Diff Action - Diffs the built Jekyll site after a change, and comments the result back to GitHub. (Community Resources / Utility)
- fucking-awesome-actions - Jekyll Diff Action - Diffs the built Jekyll site after a change, and comments the result back to GitHub. (Community Resources / Utility)
- awesome-workflows - Jekyll Diff Action - Diffs the built Jekyll site after a change, and comments the result back to GitHub. (Community Resources / Utility)
README
# Jekyll Diff Action
A Github Action that diffs the built Jekyll site after a change, and comments the result back to GitHub.
## Getting Started
Create a workflow file (e.g. `jekyll-diff.yml`) in `your-repo/.github/workflows/` directory, similar to:
``` yaml
name: Jekyll diff
on: [push, pull_request]jobs:
diff-site:
runs-on: ubuntu-lateststeps:
- uses: actions/checkout@v1
- uses: David-Byrne/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```If you don't want the action to run on both commits and PRs, remove whichever trigger you don't need. The `GITHUB_TOKEN` is required to allow the action comment the diff back on GitHub.
And that's pretty much it! From now on, any changes you make on GitHub should have a comment showing their impact on the final version of your site, like this:
``` diff
--- /tmp/old/hello.html
+++ /tmp/new/hello.html
@@ -1 +1 @@
-hello world
+Hello World!
```While simple markdown updates usually result in trivial HTML changes, (e.g. the diff above), bumping dependencies or adding new plugins can cause many hard to detect issues. This is where jekyll-diff-action really shines, nothing on your site changes without your knowledge.
## Licence
Jekyll diff action is released under an [MIT licence](/LICENSE).