-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
50 lines (45 loc) · 1.32 KB
/
action.yml
File metadata and controls
50 lines (45 loc) · 1.32 KB
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: SnapMock Screenshot Generator
description: Take styled mockup screenshots of any webpage with optional element interactions.
author: Programming-Sai
branding:
icon: "zap"
color: "gray-dark"
inputs:
url:
description: "The URL of the page to screenshot"
required: true
devices:
description: "Comma-separated list of devices to use (e.g. laptop,mobile)"
required: true
output:
description: "Directory to save the output screenshots"
required: true
selectors:
description: "Comma-separated list of CSS selectors to interact with (optional)"
required: false
default: "null"
runs:
using: "composite"
steps:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: |
echo "Current Dir: $(pwd)"
cd ${{ github.action_path }}
echo "Action Dir: $(pwd)"
npm ci
npm list
shell: bash
- name: Run SnapMock script
run: |
cd ${{ github.action_path }}
node index.js "${{ inputs.url }}" "${{ inputs.devices }}" "${{ inputs.output }}" "${{ inputs.selectors }}"
shell: bash
env:
URL: ${{ inputs.url }}
DEVICES: ${{ inputs.devices }}
OUTPUT: ${{ inputs.output }}
SELECTORS: ${{ inputs.selectors }}