Skip to content

screenshots ci actions #338

screenshots ci actions

screenshots ci actions #338

Workflow file for this run

name: screenshots ci actions
on:
workflow_run:
workflows: ["pages-build-deployment"]
types:
- completed
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true
jobs:
screenshots:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Remove old screenshots first
run: rm -rd screenshots
- name: install puppeteer-headful
uses: mujo-code/puppeteer-headful@master
env:
CI: 'true'
- name: Create temporary directory for screenshots
run: mkdir new_screenshots
- name: Generate screenshots homepage
uses: flameddd/screenshots-ci-action@master
with:
url: https://michaeltroger.com
devices: iPhone 13
- name: Keep only few homepage screenshots
run: |
cp screenshots/iPhone* new_screenshots/home_iphone.jpeg
cp screenshots/desktopPage1920x1080* new_screenshots/home_desktop.jpeg
rm -rd screenshots
- name: Generate screenshots contact page
uses: flameddd/screenshots-ci-action@master
with:
url: https://michaeltroger.com/contact
devices: iPhone 13
- name: Keep only few contact screenshots
run: |
cp screenshots/iPhone* new_screenshots/contact_iphone.jpeg
cp screenshots/desktopPage1920x1080* new_screenshots/contact_desktop.jpeg
rm -rd screenshots
- name: Rename screenshots folder
run: mv new_screenshots screenshots
- name: Create screenshot pull request if on master branch
uses: peter-evans/create-pull-request@v6
if: github.ref == 'refs/heads/master'
with:
branch: feature/update_screenshots
title: Update of screenshots
commit-message: Update of screenshots
add-paths: |
screenshots/*