---
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
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