update latest job descriptions #35
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 demo gif | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
generate-gif: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check for changes in src folder | |
id: check_changes | |
run: | | |
if git diff --quiet HEAD -- src/; then | |
echo "CHANGED=false" >> $GITHUB_ENV | |
else | |
echo "CHANGED=true" >> $GITHUB_ENV | |
fi | |
- name: Generate GIF from Website | |
if: env.CHANGED == 'true' | |
uses: PabloLec/website-to-gif@2.1.1 | |
with: | |
url: "https://mrtysn.github.io/cv/" | |
save_path: "/" | |
file_format: "GIF" | |
file_name: "cv-preview" | |
window_width: 960 | |
window_height: 720 | |
final_width: 640 | |
final_height: 480 | |
scroll_step: 15 | |
time_per_frame: 100 | |
start_delay: 4000 | |
- name: Commit GIF to the Repository | |
if: env.CHANGED == 'true' | |
id: commit | |
run: | | |
git config --global user.name "${{ github.actor }}" | |
git config --global user.email "${{ github.actor }}@users.noreply.github.com" | |
git add . | |
if git diff-index --quiet HEAD; then | |
echo "CHANGED_COMMIT=false" >> $GITHUB_ENV | |
else | |
git commit -m 'Automatically generate GIF of the CV website' | |
echo "CHANGED_COMMIT=true" >> $GITHUB_ENV | |
fi | |
- name: Push changes | |
if: env.CHANGED_COMMIT == 'true' | |
run: git push |