Add target to upload the website
The token will need to be added in id_oauth2_bearer. It's not very safe to pass the content to a command as any user on the system on which it is run will be able to get the token, though I didn't find a command line argument in curl to pass it a file path instead. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
This commit is contained in:
parent
0292688c77
commit
b7e10712a3
|
@ -1,2 +1,3 @@
|
|||
/untitled/
|
||||
/id_oauth2_bearer
|
||||
/website.tar.gz
|
||||
|
|
17
Makefile
17
Makefile
|
@ -12,7 +12,9 @@
|
|||
#
|
||||
# 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 build website.tar.gz
|
||||
DOMAIN := gnutoo.srht.site
|
||||
|
||||
.PHONY: all build help upload website.tar.gz
|
||||
|
||||
all: website.tar.gz
|
||||
|
||||
|
@ -32,6 +34,19 @@ build:
|
|||
-- \
|
||||
./build.sh
|
||||
|
||||
help:
|
||||
@printf "%s\n\t%s\n\t%s\n\t%s\n" \
|
||||
"Available commands:" \
|
||||
"help # Print this help" \
|
||||
"upload # Upload the website to https://$(DOMAIN)" \
|
||||
"website.tar.gz # Create a tarball of the website"
|
||||
|
||||
upload: website.tar.gz
|
||||
curl \
|
||||
--oauth2-bearer `cat id_oauth2_bearer` \
|
||||
-Fcontent=@website.tar.gz \
|
||||
https://pages.sr.ht/publish/$(DOMAIN)
|
||||
|
||||
# See https://reproducible-builds.org/docs/archives/ for more details
|
||||
website.tar.gz: build
|
||||
tar \
|
||||
|
|
12
README
12
README
|
@ -1,6 +1,18 @@
|
|||
== Introduction ==
|
||||
This project enables to easily build and deploy the Libreboot website.
|
||||
|
||||
== Local deployments ==
|
||||
For local deployments you just need to extract the tarball in a
|
||||
webroot and have a web server serve that content.
|
||||
|
||||
== Deployment on Sourcehut ==
|
||||
Sourcehut has a way to setup a static website by uploading a tarball
|
||||
of the content. Users that want to deploy a website there are expected
|
||||
to follow the official documentation[1] to generate a token and add
|
||||
this token to the id_oauth2_bearer file in the current directory.
|
||||
|
||||
[1]https://srht.site/quickstart
|
||||
|
||||
== License ==
|
||||
This project is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
Loading…
Reference in New Issue