~sircmpwn/sr.ht-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2 2

[PATCH] add parcel example

Details
Message ID
<20240211050938.81619-1-alex.sirota@icloud.com>
DKIM signature
pass
Download raw message
Patch: +26 -0
---
 parcel.yml | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 parcel.yml

diff --git a/parcel.yml b/parcel.yml
new file mode 100644
index 0000000..5481bd9
--- /dev/null
+++ b/parcel.yml
@@ -0,0 +1,26 @@
# which container image to use for the build
image: alpine/latest
# packages to install on the container - these are all added with `apk add`
packages: 
- hut
- nodejs
- yarn
# builds.sr.ht automatically provisions an oauth token for us. these are the scopes it has.
oauth: pages.sr.ht/PAGES:RW
# env vars
environment:
  site: example.srht.site
# repos to clone
sources:
 - git@git.sr.ht:~alexjs/alex.sirota.org
# build steps
tasks:
- install: |
    cd $site
    yarn
- package: |
    cd $site 
    yarn build
    tar -C dist/ -cvz . > ../site.tar.gz
- upload:
    hut pages publish -d $site site.tar.gz
-- 
2.43.0
Details
Message ID
<90017fe1-b19b-4d17-864a-953489c2b7d9@icloud.com>
In-Reply-To
<20240211050938.81619-1-alex.sirota@icloud.com> (view parent)
DKIM signature
pass
Download raw message
Oops, this belongs in ~sircmpwn/pages.sr.ht-examples. Should have added
that in my message.
Details
Message ID
<df2a9eaf-e77b-45b1-bf30-2b851e988483@bitfehler.net>
In-Reply-To
<20240211050938.81619-1-alex.sirota@icloud.com> (view parent)
DKIM signature
pass
Download raw message
On 2/11/24 06:09, Alex Sirota wrote:
> ---
>   parcel.yml | 26 ++++++++++++++++++++++++++
>   1 file changed, 26 insertions(+)
>   create mode 100644 parcel.yml
> 
> diff --git a/parcel.yml b/parcel.yml
> new file mode 100644
> index 0000000..5481bd9
> --- /dev/null
> +++ b/parcel.yml
> @@ -0,0 +1,26 @@
> +# which container image to use for the build

This is not a container, it's a VM.

> +image: alpine/latest
> +# packages to install on the container - these are all added with `apk add`

Likewise.

> +packages:
> +- hut
> +- nodejs
> +- yarn
> +# builds.sr.ht automatically provisions an oauth token for us. these are the scopes it has.
> +oauth: pages.sr.ht/PAGES:RW
> +# env vars
> +environment:
> +  site: example.srht.site
> +# repos to clone
> +sources:
> + - git@git.sr.ht:~alexjs/alex.sirota.org

This a git+ssh URL, so it will not work without adding a secret. 
Probably best to remove the sources stanza alltogether, like in the 
other examples.

> +# build steps
> +tasks:
> +- install: |
> +    cd $site
> +    yarn
> +- package: |
> +    cd $site
> +    yarn build
> +    tar -C dist/ -cvz . > ../site.tar.gz

Now, I have no idea what "parcel" is, but I find it slightly surprising 
that it does not show up in the commands at all. Might it make more 
sense to call this a "yarn" example? I assume there might be other 
generators using this set of commands?

> +- upload:
> +    hut pages publish -d $site site.tar.gz
Reply to thread Export thread (mbox)