-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
47 lines (39 loc) · 1.5 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
name: Argos CI
on:
push:
branches: [main]
pull_request:
branches: [main]
types:
# Those 3 are the default PR workflow activity types,
# see https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
- opened
- synchronize
- reopened
# We want trigger workflow on labeled too!
- labeled
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
take-screenshots:
# Argos is heavy to run
# We only want to trigger Argos on PRs with the 'Argos' label
# See https://stackoverflow.com/questions/62325286/run-github-actions-when-pull-requests-have-a-specific-label
if: ${{ (github.event_name != 'pull_request' && github.ref_name == 'main') || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'Argos')) }}
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Use Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: lts/*
- name: Install dependencies
run: yarn || yarn || yarn
- name: Install Playwright browsers
run: npx playwright install --with-deps chromium
- name: Build website fast
run: yarn argos:build
- name: Take Argos screenshots
run: yarn argos:screenshot