image: node:lts stages: - build - deploy cache: paths: - node_modules/ build: stage: build script: - apt-get update --allow-releaseinfo-change || apt-get update --fix-missing || (sleep 10 && apt-get update) - apt-get install -y --no-install-recommends --fix-missing xvfb libgtk-3-0 libnss3 libasound2 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libgbm1 libasound2 - npm install - export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 - npm install -g playwright-chromium @playwright/test - npx playwright install --with-deps chromium || npx playwright install-deps chromium - npm run build artifacts: paths: - dist retry: max: 2 when: script_failure pages: stage: deploy dependencies: - build script: - mkdir -p public - cp -r dist/* public/ || echo "Warning, No files to copy or dist directory is empty" - ls -la public/ - echo "Pages deployment running on branch $CI_COMMIT_REF_NAME" artifacts: paths: - public only: - main - master