chore: setup Gitlab pages

pull/1/head
Jalil Arfaoui 2022-06-27 02:06:32 +02:00
parent 263dca1703
commit 9722532ec2
2 changed files with 22 additions and 9 deletions

View File

@ -1,12 +1,24 @@
# You can override the included template(s) by including variable overrides image: node:18
# SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings
# Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/#customizing-settings
# Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings
# Container Scanning customization: https://docs.gitlab.com/ee/user/application_security/container_scanning/#customizing-the-container-scanning-settings
# Note that environment variables can be set in several places
# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence
stages: stages:
- test - test
- deploy
workflow:
rules:
- if: $CI_COMMIT_BRANCH
pages:
stage: deploy
script:
- npm install
- npm run build
artifacts:
paths:
- _site
rules:
- if: $CI_COMMIT_BRANCH == "main"
sast: sast:
stage: test stage: test
include: include:

View File

@ -7,7 +7,8 @@
"author": "Jalil Arfaoui <jalil@arfaoui.net>", "author": "Jalil Arfaoui <jalil@arfaoui.net>",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"dev": "eleventy --serve" "dev": "eleventy --serve",
"build": "eleventy"
}, },
"devDependencies": { "devDependencies": {
"@11ty/eleventy": "^1.0.1", "@11ty/eleventy": "^1.0.1",