-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (47 loc) · 1.37 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
56
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: "0 4 * * *"
repository_dispatch:
types:
- rebuild
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
cache-dependency-path: package-lock.json
- name: Install dependencies
run: npm install
- name: Upload images to CDN and generate JSON file
run: make dev
env:
IMAGEKIT_PUBLIC_KEY: ${{ secrets.IMAGEKIT_PUBLIC_KEY }}
IMAGEKIT_PRIVATE_KEY: ${{ secrets.IMAGEKIT_PRIVATE_KEY }}
- name: Commit new screenshots
uses: stefanzweifel/git-auto-commit-action@v5
with:
file_pattern: "screenshots screenshots.json"
branch: ${{ github.head_ref }}
commit_message: Commit new screenshots
commit_user_name: Analysis Tools Bot
commit_user_email: bot@analysis-tools.dev
commit_author: Analysis Tools Bot <bot@analysis-tools.dev>
- name: Redeploy website
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
repository: analysis-tools-dev/website-next
event-type: rebuild