-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (52 loc) · 1.54 KB
/
argos.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
57
58
59
60
61
62
63
name: Argos CI Screenshots
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
push:
branches: [ main ]
paths:
- apps/docs/**
pull_request:
branches: [ main ]
paths:
- apps/docs/**
types:
- opened
- synchronize
- reopened
- labeled
workflow_dispatch:
jobs:
take-screenshots:
runs-on: ubuntu-latest
if: ${{ github.ref_name == 'main' || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'Argos')) }}
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: current
- name: Use pnpm
uses: pnpm/action-setup@v2
with:
version: latest
- name: Install dependencies
run: pnpm install
- name: Install Playwright browsers
run: pnpm dlx playwright install --with-deps chromium
- name: Setup Playwright
working-directory: apps/docs
run: pnpm exec playwright install
- name: Build the website
working-directory: apps/docs
run: pnpm exec docusaurus build
- name: Take screenshots with Playwright
working-directory: apps/docs
run: pnpm exec playwright test
- name: Upload screenshots to Argos
working-directory: apps/docs
run: pnpm exec argos upload ./screenshots
env:
ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }}