mirror of
https://mau.dev/andreijiroh-dev/website.git
synced 2024-11-27 18:53:40 +00:00
ci(builds.sr.ht): use site_url specific builds via env
Also did some fixes over at deploy-gmi script too Signed-off-by: Andrei Jiroh Halili <ajhalili2006@andreijiroh.eu.org>
This commit is contained in:
parent
38b4b39aed
commit
98f0263354
8 changed files with 40 additions and 27 deletions
12
.build.yml
12
.build.yml
|
@ -38,14 +38,18 @@ tasks:
|
||||||
|
|
||||||
# our build script handles both the install and build stuff itself
|
# our build script handles both the install and build stuff itself
|
||||||
export PATH="$PATH:$HOME/.local/bin"
|
export PATH="$PATH:$HOME/.local/bin"
|
||||||
bash ./build.sh
|
pipenv install --ignore-pipfile --deploy
|
||||||
|
pipenv run build-tilde-ctrlc
|
||||||
|
pipenv run build-tilde-psflt
|
||||||
|
pipenv run build-tilde-dimensions
|
||||||
- generate-archive: |
|
- generate-archive: |
|
||||||
cd web
|
cd web
|
||||||
tar -C public -cvz . -f tildeweb-prod-build.tar.gz
|
tar -C build -cvz . -f tildeweb-prod-build.tar.gz
|
||||||
- deploy: |
|
- deploy: |
|
||||||
cd web
|
cd web
|
||||||
echo "StrictHostKeyChecking=no" >> ~/.ssh/config
|
echo "StrictHostKeyChecking=no" >> ~/.ssh/config
|
||||||
rsync -rP -e 'ssh -i ~/.ssh/passwordless-auth-sshfs' public/ 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' public/ 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
|
||||||
artifacts:
|
artifacts:
|
||||||
- web/tildeweb-prod-build.tar.gz
|
- web/tildeweb-prod-build.tar.gz
|
||||||
|
|
8
Pipfile
8
Pipfile
|
@ -21,6 +21,8 @@ python_version = "3.11"
|
||||||
|
|
||||||
[scripts]
|
[scripts]
|
||||||
dev = "mkdocs serve --watch overrides --watch-theme --livereload"
|
dev = "mkdocs serve --watch overrides --watch-theme --livereload"
|
||||||
build = "mkdocs build"
|
build = "bash bin/build.sh"
|
||||||
build-staging = "mkdocs build -f mkdocs.readthedocs.yml"
|
build-staging = "bash bin/build.sh mkdocs.readthedocs.yml"
|
||||||
build-tilde = "mkdocs build -f mkdocs.tilde.yml"
|
build-tilde-ctrlc = "TILDE_PUBLIC_HTML_BASE=https://ctrl-c.club/~ajhalili2006/ TARGET_DIR=build/ctrl-c.club bash bin/build.sh mkdocs.tilde.yml"
|
||||||
|
build-tilde-psflt = "TILDE_PUBLIC_HTML_BASE=https://ajhalili2006.p.psf.lt/ TARGET_DIR=build/p.psf.lt bash bin/build.sh mkdocs.tilde.yml"
|
||||||
|
build-tilde-dimensions = "TILDE_PUBLIC_HTML_BASE=https://ajhalili2006.dimension.sh TARGET_DIR=build/dimension.sh bash bin/build.sh mkdocs.tilde.yml"
|
||||||
|
|
14
Pipfile.lock
generated
14
Pipfile.lock
generated
|
@ -400,11 +400,11 @@
|
||||||
},
|
},
|
||||||
"markdown": {
|
"markdown": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
"sha256:225c6123522495d4119a90b3a3ba31a1e87a70369e03f14799ea9c0d7183a3d6",
|
"sha256:4afb124395ce5fc34e6d9886dab977fd9ae987fc6e85689f08278cf0c69d4bf3",
|
||||||
"sha256:a4c1b65c0957b4bd9e7d86ddc7b3c9868fb9670660f6f99f6d1bca8954d5a941"
|
"sha256:a807eb2e4778d9156c8f07876c6e4d50b5494c5665c4834f67b06459dfd877b3"
|
||||||
],
|
],
|
||||||
"markers": "python_version >= '3.7'",
|
"markers": "python_version >= '3.8'",
|
||||||
"version": "==3.4.4"
|
"version": "==3.5"
|
||||||
},
|
},
|
||||||
"markupsafe": {
|
"markupsafe": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
|
@ -517,12 +517,12 @@
|
||||||
},
|
},
|
||||||
"mkdocs-material": {
|
"mkdocs-material": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
"sha256:3274a47a4e55a541b25bd8fa4937cf3f3c82a51763453511661e0052062758b9",
|
"sha256:86fe79253afccc7f085f89a2d8e9e3300f82c4813d9b910d9081ce57a7e68380",
|
||||||
"sha256:5c9abc3f6ba8f88be1f9f13df23d695ca4dddbdd8a3538e4e6279c055c3936bc"
|
"sha256:ab84a7cfaf009c47cd2926cdd7e6040b8cc12c3806cc533e8b16d57bd16d9c47"
|
||||||
],
|
],
|
||||||
"index": "pypi",
|
"index": "pypi",
|
||||||
"markers": "python_version >= '3.8'",
|
"markers": "python_version >= '3.8'",
|
||||||
"version": "==9.4.3"
|
"version": "==9.4.4"
|
||||||
},
|
},
|
||||||
"mkdocs-material-extensions": {
|
"mkdocs-material-extensions": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
|
|
|
@ -5,13 +5,18 @@ TARGET_DIR=${TARGET_DIR:-"$PWD/public"}
|
||||||
FF_OFFLINE_MKDOCS_PLUGIN=${FF_OFFLINE_MKDOCS_PLUGIN:-"false"}
|
FF_OFFLINE_MKDOCS_PLUGIN=${FF_OFFLINE_MKDOCS_PLUGIN:-"false"}
|
||||||
FF_ENABLE_COMMIT_DATA=${FF_ENABLE_COMMIT_DATA:-"true"}
|
FF_ENABLE_COMMIT_DATA=${FF_ENABLE_COMMIT_DATA:-"true"}
|
||||||
FF_GENERATE_SOCIAL_CARDS=${FF_GENERATE_SOCIAL_CARDS:-"true"}
|
FF_GENERATE_SOCIAL_CARDS=${FF_GENERATE_SOCIAL_CARDS:-"true"}
|
||||||
|
TARGET_BUILD_CONFIG=${1:-"mkdocs.yml"}
|
||||||
|
|
||||||
|
if [[ ! -d "$TARGET_DIR" ]]; then
|
||||||
|
mkdir "$TARGET_DIR" -pv
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $SKIP_VENV_SETUP == "" ]] || [[ $CI == "" ]]; then
|
if [[ $SKIP_VENV_SETUP == "" ]] || [[ $CI == "" ]]; then
|
||||||
pipenv install -r requirements.txt
|
pipenv install -r requirements.txt
|
||||||
pipenv run -- mkdocs build -d "$TARGET_DIR"
|
pipenv run -- mkdocs build -d "$TARGET_DIR" -f ${TARGET_BUILD_CONFIG}
|
||||||
else
|
else
|
||||||
pip3 install -r requirements.txt --upgrade --user
|
pip3 install -r requirements.txt --upgrade --user
|
||||||
mkdocs build -d "$TARGET_DIR"
|
mkdocs build -d "$TARGET_DIR" -f ${TARGET_BUILD_CONFIG}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir "$TARGET_DIR/api"
|
mkdir "$TARGET_DIR/api"
|
||||||
|
|
|
@ -14,10 +14,10 @@ git rev-parse HEAD > "gmi/api/commit"
|
||||||
tar -C gmi -cvz . -f gemini-site.tar.gz
|
tar -C gmi -cvz . -f gemini-site.tar.gz
|
||||||
|
|
||||||
curl --oauth2-bearer "$SOURCEHUT_PAGES_TOKEN" \
|
curl --oauth2-bearer "$SOURCEHUT_PAGES_TOKEN" \
|
||||||
-Fcontent=@site.tar.gz \
|
-Fcontent=@gemini-site.tar.gz \
|
||||||
-Fprotocol=GEMINI \
|
-Fprotocol=GEMINI \
|
||||||
"https://pages.sr.ht/publish/${SOURCEHUT_USERNAME}.srht.site"
|
"https://pages.sr.ht/publish/${SOURCEHUT_USERNAME}.srht.site"
|
||||||
curl --oauth2-bearer "$SOURCEHUT_PAGES_TOKEN" \
|
curl --oauth2-bearer "$SOURCEHUT_PAGES_TOKEN" \
|
||||||
-Fcontent=@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}"
|
||||||
|
|
|
@ -41,6 +41,7 @@ RUN apk add --no-cache \
|
||||||
openssh \
|
openssh \
|
||||||
gnupg \
|
gnupg \
|
||||||
curl \
|
curl \
|
||||||
|
rsync
|
||||||
&& curl -Ls --tlsv1.2 --proto "=https" --retry 3 https://cli.doppler.com/install.sh \
|
&& curl -Ls --tlsv1.2 --proto "=https" --retry 3 https://cli.doppler.com/install.sh \
|
||||||
| sh
|
| sh
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
INHERIT: mkdocs.yml
|
INHERIT: mkdocs.yml
|
||||||
site_name: ~ajhalili2006 on tildeverse
|
site_name: ~ajhalili2006 on tildeverse
|
||||||
|
site_url: !ENV [TILDE_PUBLIC_HTML_BASE, "https://ctrl-c.club/~ajhalili2006/"]
|
||||||
docs_dir: markdown
|
docs_dir: markdown
|
||||||
site_dir: public_html
|
site_dir: public_html
|
||||||
extra:
|
extra:
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue