-
-
Notifications
You must be signed in to change notification settings - Fork 5
55 lines (53 loc) · 1.79 KB
/
screenshots.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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/*