-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
27 lines (25 loc) · 879 Bytes
/
.gitlab-ci.yml
File metadata and controls
27 lines (25 loc) · 879 Bytes
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
stages:
- build
variables:
GIT_STRATEGY: clone
NODE_ENV: production
GIT_DEPTH: 1
generate_metrics_card:
image: mcr.microsoft.com/playwright:v1.44.0-jammy
stage: build
variables:
URL: 'https://www.wikipedia.org'
THEME: 'transparent' # Can be overridden to "dark" or "transparent"
before_script:
- npm ci
script:
- npx ts-node src/index.ts
- git config user.name "gitlab-ci"
- git config user.email "aelmizeb@gmail.com"
- git add dist/website-metrics.svg
- git commit -m "Update website metrics card [skip ci]" || echo "No changes to commit"
- git push https://oauth2:${CI_PUSH_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git HEAD:$CI_COMMIT_REF_NAME
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
- if: '$CI_PIPELINE_SOURCE == "web"'
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_MESSAGE !~ /skip ci/i'