chore: Add Argos again #25
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Deploy Cozy-ui | |
on: pull_request | |
env: | |
ARGOS_TOKEN: ${{ vars.ARGOS_TOKEN }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
# - run: yarn add puppeteer@"21.11.0" -DE --ignore-scripts | |
- name: Install packages | |
run: | | |
echo $ARGOS_TOKEN | |
yarn install --frozen-lockfile --ignore-optional | |
# - name: Lint | |
# run: yarn lint | |
- name: Generate Sprite and Palette | |
run: yarn makeSpriteAndPalette | |
- name: Build JS | |
run: yarn build | |
- name: Build CSS | |
run: yarn build:css:all | |
- name: Build docs | |
run: | | |
yarn build:doc:react | |
yarn build:doc:kss | |
# - name: Tests without snapshots | |
# run: yarn test:noSnapshots | |
# - name: Tests snapshots | |
# run: yarn test:snapshots | |
# - name: Bundlemon | |
# run: yarn bundlemon | |
- name: Argos - Prepare env | |
run: | | |
yarn add puppeteer@"21.11.0" --dev --exact | |
mkdir ./screenshots | |
# yarn add puppeteer@"21.11.0" -DE --ignore-scripts | |
# - run: npx puppeteer browsers install chrome | |
# - run: cd node_modules/puppeteer/ && yarn exec node install.mjs | |
- name: Argos - Create desktop screenshots | |
run: yarn screenshots --mode react --viewport desktop --screenshot-dir ./screenshots/reactDesktop | |
- name: Argos - Create mobile screenshots | |
run: yarn screenshots --mode react --viewport 300x600 --screenshot-dir ./screenshots/reactMobile | |
- name: Argos - Create kss screenshots | |
run: yarn screenshots --mode kss --screenshot-dir ./screenshots/kss | |
- name: Argos - Upload all screenshots | |
run: | | |
yarn argos:upload --parallel screenshots/reactDesktop/ --token $ARGOS_TOKEN --parallel-total 3 --parallel-nonce $GITHUB_JOB --ignore '' | |
yarn argos:upload --parallel screenshots/reactMobile/ --token $ARGOS_TOKEN --parallel-total 3 --parallel-nonce $GITHUB_JOB --ignore '' | |
yarn argos:upload --parallel screenshots/kss/ --token $ARGOS_TOKEN --parallel-total 3 --parallel-nonce $GITHUB_JOB --ignore '' |