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:
parent
8f469e26a1
commit
0292688c77
|
@ -1 +1,2 @@
|
||||||
/untitled/
|
/untitled/
|
||||||
|
/website.tar.gz
|
||||||
|
|
18
Makefile
18
Makefile
|
@ -12,9 +12,11 @@
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
# 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 \
|
guix shell \
|
||||||
--container \
|
--container \
|
||||||
--network \
|
--network \
|
||||||
|
@ -29,3 +31,15 @@ all:
|
||||||
sed \
|
sed \
|
||||||
-- \
|
-- \
|
||||||
./build.sh
|
./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/##" \
|
||||||
|
|
Loading…
Reference in New Issue