Generate a tarball of the website

Sourcehut has a way to setup a static website by uploading a tarball
of the content[1].

Even if we don't end up using Sourcehut, generating a tarball of the
website enables more easy deployments.

Note that we didn't touch to the website code yet, so it still uses
the old URLs, the old image locations, etc.

After creating a token (documentation[1]), the website can then be
uploaded with the following command:
curl \
	--oauth2-bearer "<token>" \
	-Fcontent=@website.tar.gz \
	https://pages.sr.ht/publish/gnutoo.srht.site

[1]https://srht.site/quickstart

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
This commit is contained in:
Denis 'GNUtoo' Carikli 2022-11-22 20:48:57 +01:00
parent 8f469e26a1
commit 0292688c77
Signed by: GNUtoo
GPG Key ID: 5F5DFCC14177E263
2 changed files with 17 additions and 2 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/untitled/
/website.tar.gz

View File

@ -12,9 +12,11 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
.PHONY: all
.PHONY: all build website.tar.gz
all:
all: website.tar.gz
build:
guix shell \
--container \
--network \
@ -29,3 +31,15 @@ all:
sed \
-- \
./build.sh
# See https://reproducible-builds.org/docs/archives/ for more details
website.tar.gz: build
tar \
--format=gnu \
--mtime='1970-01-01 00:00Z' \
--owner=0 --group=0 --numeric-owner \
--sort=name \
-czf \
website.tar.gz \
untitled/www/lbwww/site/ \
--transform="s#untitled/www/lbwww/site/##" \