2022-11-24 17:25:46 +01:00
|
|
|
image: node:current-alpine3.15
|
|
|
|
|
2023-07-08 11:48:36 +02:00
|
|
|
cache:
|
|
|
|
key:
|
|
|
|
files:
|
|
|
|
- yarn.lock
|
|
|
|
paths:
|
|
|
|
- .yarn-cache/
|
|
|
|
|
2022-11-24 17:25:46 +01:00
|
|
|
stages:
|
2023-07-08 11:48:36 +02:00
|
|
|
- build
|
2022-11-24 17:25:46 +01:00
|
|
|
- deploy
|
|
|
|
|
2023-07-08 11:48:36 +02:00
|
|
|
build:
|
|
|
|
stage: build
|
|
|
|
|
|
|
|
script:
|
|
|
|
# Handle the Yarn
|
|
|
|
- echo 'yarn-offline-mirror ".yarn-cache/"' >> .yarnrc
|
|
|
|
- echo 'yarn-offline-mirror-pruning true' >> .yarnrc
|
|
|
|
- yarn install --frozen-lockfile --no-progress
|
|
|
|
|
|
|
|
# Install the dependencies for alpine
|
|
|
|
- apk update && apk add make graphviz zip openssh rsync
|
|
|
|
|
|
|
|
# Regenerate the static files
|
|
|
|
- make regenerate-dots
|
|
|
|
- make regenerate-zips
|
|
|
|
|
|
|
|
# Run a mock build to enable faster rebuild
|
|
|
|
- URL=http://localhost BASE_URL=/ yarn run build
|
|
|
|
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- "build/"
|
|
|
|
|
|
|
|
deploy 1/2:
|
2022-11-24 17:25:46 +01:00
|
|
|
stage: deploy
|
2023-07-08 11:48:36 +02:00
|
|
|
|
2022-11-24 17:25:46 +01:00
|
|
|
script:
|
|
|
|
- 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
|
|
|
|
- make deploy-poincare
|
2023-07-08 11:48:36 +02:00
|
|
|
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- "build/"
|
|
|
|
|
|
|
|
only:
|
|
|
|
- main
|
|
|
|
|
|
|
|
deploy 2/2:
|
|
|
|
stage: deploy
|
|
|
|
|
|
|
|
script:
|
|
|
|
- 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
|
|
|
|
- make deploy-aisa
|
|
|
|
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- "build/"
|
|
|
|
|
2022-11-24 17:25:46 +01:00
|
|
|
only:
|
2023-07-08 11:48:36 +02:00
|
|
|
- main
|