2023-07-16 17:25:45 +02:00
|
|
|
image: node:current-alpine3.15
|
|
|
|
|
|
|
|
cache:
|
|
|
|
key:
|
|
|
|
files:
|
|
|
|
- yarn.lock
|
|
|
|
paths:
|
|
|
|
- .yarn-cache/
|
|
|
|
|
|
|
|
before_script:
|
|
|
|
- echo 'yarn-offline-mirror ".yarn-cache/"' >> .yarnrc
|
|
|
|
- echo 'yarn-offline-mirror-pruning true' >> .yarnrc
|
|
|
|
- yarn install --frozen-lockfile --no-progress
|
|
|
|
- apk update && apk add make graphviz zip
|
|
|
|
|
|
|
|
pages:
|
|
|
|
script:
|
|
|
|
- make assets
|
|
|
|
- make build-poincare
|
|
|
|
artifacts:
|
2023-07-08 12:22:58 +02:00
|
|
|
paths:
|
2023-07-16 17:25:45 +02:00
|
|
|
- public
|
|
|
|
rules:
|
|
|
|
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
|
|
|
|
# .build:
|
|
|
|
# before_script:
|
|
|
|
# # Handle the Yarn
|
|
|
|
# - echo 'yarn-offline-mirror ".yarn-cache/"' >> .yarnrc
|
|
|
|
# - echo 'yarn-offline-mirror-pruning true' >> .yarnrc
|
|
|
|
# - yarn install --frozen-lockfile --no-progress
|
2023-07-08 12:22:58 +02:00
|
|
|
|
2023-07-16 17:25:45 +02:00
|
|
|
# # Install the dependencies for alpine
|
|
|
|
# - apk update && apk add make graphviz zip
|
2022-11-24 17:25:46 +01:00
|
|
|
|
2023-07-16 17:25:45 +02:00
|
|
|
# .deploy:
|
|
|
|
# before_script:
|
|
|
|
# # Install the dependencies for alpine
|
|
|
|
# - apk update && apk add make openssh rsync
|
2023-07-08 11:48:36 +02:00
|
|
|
|
2023-07-16 17:25:45 +02:00
|
|
|
# # Prepare environment for SSH
|
|
|
|
# - mkdir -p ~/.ssh
|
|
|
|
# - ln -s $SSH_CONFIG ~/.ssh/config
|
|
|
|
# - ln -s $SSH_KEY ~/.ssh/id_ed25519
|
|
|
|
# - ln -s $SSH_KNOWN_HOSTS ~/.ssh/known_hosts
|
|
|
|
# - chmod 600 ~/.ssh/config ~/.ssh/id_ed25519 ~/.ssh/known_hosts
|
2023-07-08 12:22:58 +02:00
|
|
|
|
2023-07-16 17:25:45 +02:00
|
|
|
# default:
|
|
|
|
# image: node:current-alpine3.15
|
2023-07-08 11:48:36 +02:00
|
|
|
|
2023-07-16 17:25:45 +02:00
|
|
|
# cache:
|
|
|
|
# key:
|
|
|
|
# files:
|
|
|
|
# - yarn.lock
|
|
|
|
# paths:
|
|
|
|
# - .yarn-cache/
|
2023-07-08 11:48:36 +02:00
|
|
|
|
2023-07-16 17:25:45 +02:00
|
|
|
# stages:
|
|
|
|
# - build
|
|
|
|
# - deploy
|
2023-07-08 11:48:36 +02:00
|
|
|
|
2023-07-16 17:25:45 +02:00
|
|
|
# build:poincare:
|
|
|
|
# stage: build
|
2023-07-08 12:22:58 +02:00
|
|
|
|
2023-07-16 17:25:45 +02:00
|
|
|
# extends: .build
|
2023-07-08 12:22:58 +02:00
|
|
|
|
2023-07-16 17:25:45 +02:00
|
|
|
# script:
|
|
|
|
# # Regenerate the static files
|
|
|
|
# - make regenerate-dots
|
|
|
|
# - make regenerate-zips
|
2023-07-08 12:22:58 +02:00
|
|
|
|
2023-07-16 17:25:45 +02:00
|
|
|
# - URL="https://blog.mfocko.xyz" BASE_URL="/" yarn run build
|
2023-07-08 12:22:58 +02:00
|
|
|
|
2023-07-16 17:25:45 +02:00
|
|
|
# artifacts:
|
|
|
|
# paths:
|
|
|
|
# - "build/"
|
2023-07-08 12:22:58 +02:00
|
|
|
|
2023-07-16 17:25:45 +02:00
|
|
|
# build:aisa:
|
|
|
|
# stage: build
|
2023-07-08 12:22:58 +02:00
|
|
|
|
2023-07-16 17:25:45 +02:00
|
|
|
# extends: .build
|
2023-07-08 11:48:36 +02:00
|
|
|
|
2023-07-16 17:25:45 +02:00
|
|
|
# script:
|
|
|
|
# # Regenerate the static files
|
|
|
|
# - make regenerate-dots
|
|
|
|
# - make regenerate-zips
|
2023-07-08 11:48:36 +02:00
|
|
|
|
2023-07-16 17:25:45 +02:00
|
|
|
# - URL="https://fi.muni.cz" BASE_URL="~xfocko/kb/" yarn run build
|
2023-07-08 11:48:36 +02:00
|
|
|
|
2023-07-16 17:25:45 +02:00
|
|
|
# artifacts:
|
|
|
|
# paths:
|
|
|
|
# - "build/"
|
2023-07-08 11:48:36 +02:00
|
|
|
|
2023-07-16 17:25:45 +02:00
|
|
|
# deploy:poincare:
|
|
|
|
# stage: deploy
|
|
|
|
# needs: [build:poincare]
|
2023-07-08 12:22:58 +02:00
|
|
|
|
2023-07-16 17:25:45 +02:00
|
|
|
# extends: .deploy
|
2023-07-08 11:48:36 +02:00
|
|
|
|
2023-07-16 17:25:45 +02:00
|
|
|
# script:
|
|
|
|
# - rsync -avzrlpptv --delete build/ poincare:~/public_html/blog/
|
2023-07-08 11:48:36 +02:00
|
|
|
|
2023-07-16 17:25:45 +02:00
|
|
|
# artifacts:
|
|
|
|
# paths:
|
|
|
|
# - "build/"
|
|
|
|
|
|
|
|
# only:
|
|
|
|
# - main
|
|
|
|
|
|
|
|
# deploy:aisa:
|
|
|
|
# stage: deploy
|
|
|
|
# needs: [build:aisa]
|
|
|
|
|
|
|
|
# extends: .deploy
|
|
|
|
|
|
|
|
# script:
|
|
|
|
# - rsync -avzrlpptv --delete build/ aisa:~/public_html/kb/
|
|
|
|
|
|
|
|
# artifacts:
|
|
|
|
# paths:
|
|
|
|
# - "build/"
|
2023-07-08 11:48:36 +02:00
|
|
|
|
2023-07-16 17:25:45 +02:00
|
|
|
# only:
|
|
|
|
# - main
|