-
Notifications
You must be signed in to change notification settings - Fork 41
38 lines (29 loc) · 977 Bytes
/
update-preview.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
name: 📸 Update Preview
on:
workflow_dispatch:
push:
branches: [main]
# enable this for your repository if you want to trigger this workflow to observe specific file/directory changes
paths:
- 'client/**'
permissions:
contents: write
jobs:
update-preview:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@main
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install Puppeteer
run: npm install puppeteer
- name: Take snapshot
run: node .github/take-snapshot.mjs
- name: Push Changes
uses: ./.github/actions/push-changes
with:
message: 'feat: updated preview in README.md'
paths: './.github/preview.png'