mirror of https://git.sr.ht/~sircmpwn/srht.site
Use hut instead of acurl
This commit is contained in:
parent
e68c8a10ba
commit
5777fd6be6
|
@ -24,8 +24,10 @@ building and deploying our site. Create a file named ".build.yml" and fill it in
|
|||
with this template:
|
||||
|
||||
```
|
||||
image: alpine/latest
|
||||
image: alpine/edge
|
||||
oauth: pages.sr.ht/PAGES:RW
|
||||
packages:
|
||||
- hut
|
||||
environment:
|
||||
site: your-username.srht.site
|
||||
tasks:
|
||||
|
@ -33,14 +35,14 @@ tasks:
|
|||
cd $site
|
||||
tar -cvz . > ../site.tar.gz
|
||||
- upload: |
|
||||
acurl -f https://pages.sr.ht/publish/$site -Fcontent=@site.tar.gz
|
||||
hut pages publish -d $site site.tar.gz
|
||||
```
|
||||
|
||||
<div class="event">
|
||||
"acurl" is short for "authenticated curl", it's a curl wrapper available in
|
||||
our build environment that is automatically authenticated to sr.ht APIs using
|
||||
an OAuth token generated on-the-fly with the permissions requested by the
|
||||
"oauth" directive - in this case, only enough to deploy your site.
|
||||
<a href="https://sr.ht/~emersion/hut/">hut</a> is a CLI tool to interact with
|
||||
the sr.ht APIs. It uses an OAuth 2.0 token generated on-the-fly with the
|
||||
permissions requested by the "oauth" directive - in this case, only enough to
|
||||
deploy your site.
|
||||
</div>
|
||||
|
||||
Update the `site` variable to your desired website (e.g.
|
||||
|
|
Loading…
Reference in New Issue