+ New pipeline for personal blog-host endpoint

This simply adds my personal host as a neww endpoint to update on the master
branch
This commit is contained in:
shockrah 2022-05-21 21:53:11 -07:00
parent 26e3dca2ea
commit 817a4ca31a
2 changed files with 35 additions and 2 deletions

View File

@ -8,6 +8,10 @@ stages:
include:
- local: 'ci/builders.yml'
################## ################## ##################
# ============== # Build Stage Jobs # ============== #
################## ################## ##################
build-neocities:
stage: build
extends: .builder
@ -23,9 +27,18 @@ build-pages:
# Next we fix the path to the font
- sed -i 's/\/media/\/shockrah-city\/media/g' public/css/style.css
build-shockrah.xyz:
stage: build
extends: .builder
script:
# Main config is found in the root of this project dir
- hugo
################## ################## ##################
# ============== # Deploy Stage Jobs # ============== #
################## ################## ##################
# Deploys the gitlab Page for
# Deploys the gitlab Page
pages:
stage: deploy
needs:
@ -38,9 +51,27 @@ pages:
paths:
- public/
# Deploys to the main blog
deploy-shockrah.xyz:
stage: deploy
image: shockrah/ansible:latest
needs:
- build-shockrah.xyz
dependencies:
- build-shockrah.xyz
before_script:
- eval "$(ssh-agent -s)"
- echo "${CI_USER_KEY}" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh/
- chmod 700 ~/.ssh/
- ssh-keyscan "$HOST" 2>&1 >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
script:
- ansible -i $INVENTORY scripts/deploy-blog.yml
neocities:
# Deploy to neocities via their curl api
deploy-neocities:
stage: deploy
needs:
- build-neocities

View File

@ -1,3 +1,5 @@
[![pipeline status](https://gitlab.com/shockrah/shockrah-city/badges/master/pipeline.svg)](https://gitlab.com/shockrah/shockrah-city/-/commits/master)
# Hello
Souce for all things related to [my personal website](https://shockrah.xyz)