diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9bcc860..af3c264 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 diff --git a/README.md b/README.md index 2147d31..97f5da5 100644 --- a/README.md +++ b/README.md @@ -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)