mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-10 00:12:09 +00:00
Move some CI logic to scripts/makefile
Also update some of its docs
This commit is contained in:
parent
29d6d88d36
commit
de65f4d506
3 changed files with 26 additions and 13 deletions
19
.build.yml
19
.build.yml
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
# we rsync binaries.tar.gz from the same server we deploy to.
|
||||
# it contains these static-pie binaries:
|
||||
# hugo, brotli, ect (like gzip/zopfli), sd, htmlq (like jq for html), and xmllint.
|
||||
# hugo, brotli, ect (like gzip/zopfli), and xmllint.
|
||||
image: alpine/edge
|
||||
packages:
|
||||
- curl # for webring update script, pre-installed on builds.sr.ht images
|
||||
- curl # Fetches webmentions and webring links. Pre-inistalled.
|
||||
- rsync
|
||||
- git # for Hugo's gitInfo, pre-installed on builds.sr.ht images
|
||||
- bmake
|
||||
- git # Powers Hugo's gitInfo. Pre-installed
|
||||
- bmake # gmake is fine too
|
||||
sources:
|
||||
- https://git.sr.ht/~seirdy/seirdy.one
|
||||
secrets:
|
||||
|
@ -19,14 +19,7 @@ triggers:
|
|||
to: seirdy@seirdy.one
|
||||
tasks:
|
||||
- deps: |
|
||||
printf "VerifyHostKeyDNS=yes\nKexAlgorithms=sntrup761x25519-sha512@openssh.com\n" >> ~/.ssh/config
|
||||
# mirrored at https://seirdy.one/misc/binaries.tar.gz
|
||||
rsync -Wv deploy@seirdy.one:/var/www/pb/binaries.tar.gz .
|
||||
mkdir -p ~/bin
|
||||
tar xzf binaries.tar.gz -oC ~/bin
|
||||
sh seirdy.one/scripts/setup-ci.sh
|
||||
- build_deploy: |
|
||||
cd seirdy.one
|
||||
export PATH=~/bin:$PATH
|
||||
# quick health + ip check
|
||||
sh scripts/connectivity-check.sh
|
||||
bmake deploy-prod deploy-onion
|
||||
bmake ci
|
||||
|
|
6
Makefile
6
Makefile
|
@ -163,6 +163,12 @@ deploy-onion:
|
|||
@$(MAKE) WWW_ROOT=/var/www/seirdy.onion HUGO_BASEURL='http://wgq3bd2kqoybhstp77i3wrzbfnsyd27wt34psaja4grqiezqircorkyd.onion/' OUTPUT_DIR=public_onion copy-to-xhtml
|
||||
@$(MAKE) WWW_ROOT=/var/www/seirdy.onion HUGO_BASEURL='http://wgq3bd2kqoybhstp77i3wrzbfnsyd27wt34psaja4grqiezqircorkyd.onion/' OUTPUT_DIR=public_onion deploy-html
|
||||
|
||||
# in CI, check connectivity and then build + deploy the clearnet and onion sites.
|
||||
.PHONY: ci
|
||||
ci:
|
||||
sh scripts/connectivity-check.sh
|
||||
@$(MAKE) deploy-prod deploy-onion
|
||||
|
||||
# we only deploy html to the staging site
|
||||
.PHONY: deploy-staging
|
||||
deploy-staging:
|
||||
|
|
14
scripts/setup-ci.sh
Normal file
14
scripts/setup-ci.sh
Normal file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
# For CI: configures SSH and installs binaries that I use to build my site.
|
||||
# The binaries are statically-linked for Linux on x86_64
|
||||
set -e -u
|
||||
|
||||
# configure ssh
|
||||
echo "VerifyHostKeyDNS=yes
|
||||
KexAlgorithms=sntrup761x25519-sha512@openssh.com" >> ~/.ssh/config
|
||||
|
||||
# mirrored at https://seirdy.one/pb/binaries.tar.gz
|
||||
rsync -WPv deploy@seirdy.one:/var/www/pb/binaries.tar.gz .
|
||||
mkdir -p /usr/local/bin
|
||||
tar xzf binaries.tar.gz -oC /usr/local/bin
|
||||
rm binaries.tar.gz
|
Loading…
Reference in a new issue