mirror of
https://mau.dev/andreijiroh-dev/website.git
synced 2024-11-24 09:23:48 +00:00
ci(builds.sr.ht): deploy gemini content via sourcehut builds instead
Signed-off-by: Andrei Jiroh Halili <ajhalili2006@andreijiroh.eu.org>
This commit is contained in:
parent
ffe6087ed8
commit
df1889bd41
3 changed files with 15 additions and 8 deletions
13
.build.yml
13
.build.yml
|
@ -3,6 +3,7 @@ environment:
|
||||||
FF_ENABLE_COMMIT_DATA: "true"
|
FF_ENABLE_COMMIT_DATA: "true"
|
||||||
FF_GENERATE_SOCIAL_CARDS: "true"
|
FF_GENERATE_SOCIAL_CARDS: "true"
|
||||||
#SKIP_VENV_SETUP: "true"
|
#SKIP_VENV_SETUP: "true"
|
||||||
|
oauth: "meta.sr.ht/PROFILE pages.sr.ht/SITES:RW pages.sr.ht/PAGES:RW pages.sr.ht/PROFILE"
|
||||||
packages:
|
packages:
|
||||||
- openssh-client
|
- openssh-client
|
||||||
- rsync
|
- rsync
|
||||||
|
@ -45,11 +46,15 @@ tasks:
|
||||||
- generate-archive: |
|
- generate-archive: |
|
||||||
cd web
|
cd web
|
||||||
tar -C build -cvz . -f tildeweb-prod-build.tar.gz
|
tar -C build -cvz . -f tildeweb-prod-build.tar.gz
|
||||||
- deploy: |
|
- deploy-html: |
|
||||||
cd web
|
cd web
|
||||||
echo "StrictHostKeyChecking=no" >> ~/.ssh/config
|
echo "StrictHostKeyChecking=no" >> ~/.ssh/config
|
||||||
rsync -rP -e 'ssh -i ~/.ssh/passwordless-auth-sshfs' build/p.psf.lt ajhalili2006@p.projectsegfau.lt:/home/ajhalili2006/public_html
|
rsync -rP -e 'ssh -i ~/.ssh/passwordless-auth-sshfs' build/p.psf.lt/ ajhalili2006@p.projectsegfau.lt:/home/ajhalili2006/public_html/
|
||||||
rsync -rP -e 'ssh -i ~/.ssh/passwordless-auth-sshfs' build/ctrl-c.club ajhalili2006@ctrl-c.club:/home/ajhalili2006/public_html
|
rsync -rP -e 'ssh -i ~/.ssh/passwordless-auth-sshfs' build/ctrl-c.club/ ajhalili2006@ctrl-c.club:/home/ajhalili2006/public_html/
|
||||||
rsync -rP -e 'ssh -i ~/.ssh/passwordless-auth-sshfs' build/dimension.sh ajhalili2006@s1.dimension.sh:/home/ajhalili2006/public_html
|
rsync -rP -e 'ssh -i ~/.ssh/passwordless-auth-sshfs' build/dimension.sh/ ajhalili2006@s1.dimension.sh:/home/ajhalili2006/public_html/
|
||||||
|
- deploy-gemini:
|
||||||
|
cd web
|
||||||
|
set +x
|
||||||
|
SOURCEHUT_PAGES_TOKEN=${OAUTH2_TOKEN} PRIVATE_SSH_KEY=~/.ssh/passwordless-auth-sshfs ./bin/deploy-gmi.sh
|
||||||
artifacts:
|
artifacts:
|
||||||
- web/tildeweb-prod-build.tar.gz
|
- web/tildeweb-prod-build.tar.gz
|
||||||
|
|
|
@ -37,7 +37,7 @@ pages:
|
||||||
# This ensures that only pushes to the default branch will trigger
|
# This ensures that only pushes to the default branch will trigger
|
||||||
# a pages deploy
|
# a pages deploy
|
||||||
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
|
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
|
||||||
pages:srht:
|
.pages:srht:
|
||||||
stage: build
|
stage: build
|
||||||
needs:
|
needs:
|
||||||
- pages
|
- pages
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -xe
|
|
||||||
|
|
||||||
|
PRIVATE_SSH_KEY=${PRIVATE_SSH_KEY:-"/run/secrets/passwordless"}
|
||||||
SOURCEHUT_USERNAME=${SOURCEHUT_PAGES_SUBDOMAIN:-"ajhalili2006"}
|
SOURCEHUT_USERNAME=${SOURCEHUT_PAGES_SUBDOMAIN:-"ajhalili2006"}
|
||||||
|
SOURCEHUT_PAGES_TOKEN=${SOURCEHUT_PAGES_TOKEN}
|
||||||
GEMINI_CUSTOM_DOMAIN=${GEMINI_CUSTOM_DOMAIN:-"gemini.andreijiroh.eu.org"}
|
GEMINI_CUSTOM_DOMAIN=${GEMINI_CUSTOM_DOMAIN:-"gemini.andreijiroh.eu.org"}
|
||||||
|
|
||||||
if [[ $SOURCEHUT_PAGES_TOKEN == "" ]]; then
|
if [[ $SOURCEHUT_PAGES_TOKEN == "" ]]; then
|
||||||
|
@ -21,5 +22,6 @@ curl --oauth2-bearer "$SOURCEHUT_PAGES_TOKEN" \
|
||||||
-Fcontent=@gemini-site.tar.gz \
|
-Fcontent=@gemini-site.tar.gz \
|
||||||
-Fprotocol=GEMINI \
|
-Fprotocol=GEMINI \
|
||||||
"https://pages.sr.ht/publish/${GEMINI_CUSTOM_DOMAIN}"
|
"https://pages.sr.ht/publish/${GEMINI_CUSTOM_DOMAIN}"
|
||||||
rsync -rP -e 'ssh -i /run/secrets/passwordless' gmi/ ajhalili2006@p.projectsegfau.lt:/home/ajhalili2006/public_gemini
|
|
||||||
rsync -rP -e 'ssh -i /run/secrets/passwordless' gmi/ ajhalili2006@s1.dimension.sh:/home/ajhalili2006/public_gemini
|
rsync -rP -e "ssh -i ${PRIVATE_SSH_KEY} -o StrictHostKeyChecking=no" gmi/ ajhalili2006@p.projectsegfau.lt:/home/ajhalili2006/public_gemini
|
||||||
|
rsync -rP -e "ssh -i ${PRIVATE_SSH_KEY} -o StrictHostKeyChecking=no" gmi/ ajhalili2006@s1.dimension.sh:/home/ajhalili2006/public_gemini
|
||||||
|
|
Loading…
Reference in a new issue