mirror of
https://github.com/mfocko/blog.git
synced 2024-11-22 04:53: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,3 +1,4 @@
|
|||
default:
|
||||
image: node:current-alpine3.15
|
||||
|
||||
cache:
|
||||
|
@ -7,14 +8,7 @@ cache:
|
|||
paths:
|
||||
- .yarn-cache/
|
||||
|
||||
stages:
|
||||
- build
|
||||
- deploy
|
||||
|
||||
build:
|
||||
stage: build
|
||||
|
||||
script:
|
||||
before_script:
|
||||
# Handle the Yarn
|
||||
- echo 'yarn-offline-mirror ".yarn-cache/"' >> .yarnrc
|
||||
- echo 'yarn-offline-mirror-pruning true' >> .yarnrc
|
||||
|
@ -23,6 +17,21 @@ build:
|
|||
# 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:
|
||||
- build
|
||||
- deploy
|
||||
|
||||
build:
|
||||
stage: build
|
||||
|
||||
script:
|
||||
# Regenerate the static files
|
||||
- make regenerate-dots
|
||||
- make regenerate-zips
|
||||
|
@ -38,11 +47,6 @@ deploy 1/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-poincare
|
||||
|
||||
artifacts:
|
||||
|
@ -56,11 +60,6 @@ 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:
|
||||
|
|
Loading…
Reference in a new issue