forked from AlexRogalskiy/github-action-screenshots
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (40 loc) · 1.17 KB
/
main.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
name: CI
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-16.04
name: Generate screenshot image
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Setup Node.js
uses: actions/setup-node@v3
- name: Install Dependencies
run: npm install
- name: Pull from current branch
run: git pull origin ${GITHUB_REF##*/}
- name: Create dist folder if note exists
run: mkdir -p dist
- name: generate screenshot image
uses: ./
with:
url: "https://www.google.com/"
name: "screenshot"
path: "images"
width: 400
height: 400
- name: Push changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Add images pulled from headless browser to folder
commit_options: '--no-verify --signoff'
- name: Archive screenshot image
uses: actions/upload-artifact@v3
with:
name: open-screenshot
path: open-screenshot.png
- name: Download all workflow run artifacts
uses: actions/download-artifact@v3