2024-01-05 17:10:44 +00:00
|
|
|
steps:
|
|
|
|
build:
|
|
|
|
image: alpine:3.19
|
|
|
|
commands:
|
|
|
|
- apk add --no-cache zola npm
|
|
|
|
- npm install -D tailwindcss @tailwindcss/typography
|
|
|
|
- npx tailwindcss -i input.css -o static/css/index.css --minify
|
|
|
|
- zola build
|
2024-01-05 17:20:42 +00:00
|
|
|
- ls -l
|
2024-01-05 17:17:02 +00:00
|
|
|
deploy:
|
2024-01-05 17:54:22 +00:00
|
|
|
image: alpine:3.19
|
2024-01-05 18:13:20 +00:00
|
|
|
secrets: [ ssh_key, ssh_key_pub ]
|
2024-01-05 17:54:22 +00:00
|
|
|
commands:
|
2024-01-05 17:57:52 +00:00
|
|
|
- apk add --no-cache git openssh
|
2024-01-05 17:54:22 +00:00
|
|
|
- mkdir -p ~/.ssh
|
|
|
|
- chmod 700 ~/.ssh
|
|
|
|
- echo $SSH_KEY > ~/.ssh/id_rsa
|
2024-01-05 18:06:44 +00:00
|
|
|
- echo $SSH_KEY_PUB > ~/.ssh/id_rsa.pub
|
2024-01-05 18:03:58 +00:00
|
|
|
- chmod 600 ~/.ssh/id_rsa
|
2024-01-05 18:06:44 +00:00
|
|
|
- chmod 600 ~/.ssh/id_rsa.pub
|
2024-01-05 18:01:11 +00:00
|
|
|
- echo "[git.polynom.me]:2222 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDZgxMAkQvYOeEwDuWY3GlIKurqZpgFXrJfo/rhlJs+l8jOiOYbl2iZMtWBbW+eVArv6dne0EmcQPkGfz4hUlgtH3aePbe5WlPYCNck0xVvG9PJN8BS2vlTzE7djOEv/UaHNeTza/tGV5KD8BAGHnav2ky2nL0zitEQku7ww2IXO4A8JECUwy/a+nKZ21tZHhEcQFo1a0EsWkGHOyYISiFulEamsbEVq49ZpvFmlK0rY7Wsn1NiXJciWmTa5dyj02MWbbg189lN/G1UpA+zepD3hdLkw9gSxG8x4L6AGTxXGlSCjWi+jVItCiuTCdwJnqkvJogYhxtxIpPpxdClv4+H362baHWTDCoaiq7T1wiYYbIQiyxCVEgN2VohoeRH/m7K4W3Uk+5XWsGM9JRFrByFiviQDRm+Xj5QnxyQHBw8mFM1q2X2PMVaR/88HptOUoNcrn2C2C30CHCc6xU+za+fGessymuamrm1Yb7zsp9U3/MZZ7ez3mbHlwmQkOmmDJySsNgTgDaWVqbYR3bn0LVgKNrjP7mXBlIFTxf00feRj8ar9hz9BzUMGcDLAvhDxLvTdcpU7rpDcg958SHmd4Xc1cYf2zSY66/9KUXFePuMSfqztzMMmRzqkYyAXGlAhb3Yze2Cr/i+A9h6jKJ7KCelnnKvqFFmg6Jfx4WQXISemQ==" > ~/.ssh/known_hosts
|
2024-01-05 17:54:22 +00:00
|
|
|
- git config --global user.email "ci@polynom.me"
|
|
|
|
- git config --global user.name "polynom.me CI system"
|
|
|
|
- git config --global --add safe.directory $CI_WORKSPACE/$CI_REPO_OWNER/$CI_REPO_NAME/deploy
|
|
|
|
- git clone -b pages $CI_REPO_CLONE_SSH_URL deploy
|
|
|
|
- cd deploy
|
|
|
|
- cp -rf ../public/* .
|
|
|
|
- git add --all
|
|
|
|
- git commit -m "Deploy new version $CI_COMMIT_SHA"
|
|
|
|
- git push -u origin pages
|