mirror of
https://github.com/mfocko/blog.git
synced 2024-11-22 13:03:47 +01:00
ci: use before_script
Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
parent
37db95b56d
commit
bc8bce309e
1 changed files with 36 additions and 37 deletions
|
@ -1,12 +1,29 @@
|
||||||
image: node:current-alpine3.15
|
default:
|
||||||
|
image: node:current-alpine3.15
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
key:
|
key:
|
||||||
files:
|
files:
|
||||||
- yarn.lock
|
- yarn.lock
|
||||||
paths:
|
paths:
|
||||||
- .yarn-cache/
|
- .yarn-cache/
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
# Install the dependencies for alpine
|
||||||
|
- apk update && apk add make graphviz zip openssh rsync
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- build
|
- build
|
||||||
- deploy
|
- deploy
|
||||||
|
@ -15,14 +32,6 @@ build:
|
||||||
stage: build
|
stage: build
|
||||||
|
|
||||||
script:
|
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
|
# Regenerate the static files
|
||||||
- make regenerate-dots
|
- make regenerate-dots
|
||||||
- make regenerate-zips
|
- make regenerate-zips
|
||||||
|
@ -38,11 +47,6 @@ deploy 1/2:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
|
|
||||||
script:
|
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
|
- make deploy-poincare
|
||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
|
@ -56,11 +60,6 @@ deploy 2/2:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
|
|
||||||
script:
|
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
|
- make deploy-aisa
|
||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
|
|
Loading…
Reference in a new issue