Fixing Up the Svelte Community Site
Tags: svelte
Published: 2020-02-25 05:47:49

---
title: Fixing Up the Svelte Community Site
published: true
description: Adding GitHub Actions and Updating Data Dependencies
tags: svelte
slug: svelte-community-fixup
displayed_publish_date: "2020-02-24"
canonical_url: https://www.swyx.io/writing/svelte-community-fixup
---

*Canonical URL: https://www.swyx.io/writing/svelte-community-fixup/*

One of my longstanding projects that I'm always feeling guilty about not spending time on is the [Svelte Community site](https://svelte-community.netlify.com/code/). 

![image](https://user-images.githubusercontent.com/6764957/75218533-80f55b00-5768-11ea-98de-1e32a3ae01c9.png)

At it's surface it is just a simple static site with searchable links to resources, but the vision is that this would hold all the stuff that the official docs and chat would not be able to hold.

Obviously the Svelte maintainers are stretched thin, and I'm just one (busy) guy, so [you're welcome to swim on in to contribute](https://github.com/sveltejs/community) if you want to help grow the Svelte community!

I took a couple hours to update it today and here are my public notes from what I did.

## Updating the `ssg` dependency

https://github.com/sveltejs/community/blob/master/package.json#L15

I have been bumping up the ssg version as I tweak features and fix bugs, so just keeping this up to par. I anticipate biting the bullet to move off of Sapper sooner rather than later given I am now consistently running into scaling issues with it on my own site.

## Updating the data and data fetching scripts

https://github.com/sveltejs/community/commit/efc0953c5bc399b985d4d75ec9ca21bcb4ef094f

We scrape [GitHub stars and npm downloads](https://svelte-community.netlify.com/code/) to give a little indication of the maintenance and adoption status of the ecosystem, this needed to be done on a more regular basis but was written just for a onetime run, so I just ran it once.

## Automating Data Scraping with GitHub Actions

[I previously wrote about this](https://www.swyx.io/writing/github-scraping/) so I assumed this would be easy, but boy I wasted an hour going nuts with the unintuitive GitHub Actions UI:


![2020-02-25 at 12 37 AM](https://user-images.githubusercontent.com/6764957/75218118-3de6b800-5767-11ea-9bb0-541c80246455.png)


This was because this is what happens when you add a valid GitHub Action:

![image](https://user-images.githubusercontent.com/6764957/75218155-5eaf0d80-5767-11ea-9b1d-60ed56936fe2.png)

That's right, absolutely no recognition at all from GH Actions that you did something right. Ugh. Took me an hour to verify that nothing went wrong, the GH Actions syntax didnt change, I wasn't going crazy.

The other thing I found out was that you can't add an environment variable prefixed with `GITHUB_` as that is a reserved env var. Understandable, but [the docs say setting an environment variable or secret with the `GITHUB_` prefix will result in an error](https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables) and there was most certainly no error.

## Work, Work

Anyway, the fixup is done, at the cost of some hair pulling from the GH Actions debacle. There is [no manual trigger](https://github.community/t5/GitHub-Actions/GitHub-Actions-Manual-Trigger-Approvals/td-p/31504) (some hacks [here](https://dev.to/s_abderemane/manual-trigger-with-github-actions-279e) and you can [create a custom webhook event](http://www.btellez.com/posts/triggering-github-actions-with-webhooks.html) if you really need to but ugh) so the only way to tell if this thing will work is to... wait.

The remaining work to do on the Svelte Community Site is:

- Add everything in Discord over the last few months
- Make events easier to signup for and notify - wire it to a Google Sheet
- Make the Showcase more impressive
- Start writing Recipes
- Look at the Vue folks for more ideas.

Once again, if you'd like to help, [you're welcome to join us](https://github.com/sveltejs/community)!