
Tangled.sh
Hello everyone, I love how I made this blog but I havenāt had too much energy to write anything. However, I wanted to write this today since Iāve moved the repository of this website to Tangled.sh. I made this change because I like supporting new projects that pop up on AtProto but also I like the idea of this website being tied to my Bluesky account more than my personal GitHub. Even though Tangled is relatively new, I found that it was pretty easy to get started and I thought Iād write about some of the things I went through to get my website up and running.
SSH Keys
A thing I found pretty nice, but not surprising, was that I was able to use the same SSH key that I had been using for my GitHub. It was pretty easy to grab my public key from ~/.ssh/*.pub
and add it to my registered keys in my Tangled settings. I imagine if you wanted to create a new key it would be pretty much the same steps as this.
Switching Remote URLs
Once I had my SSH key it was also very easy to take my local folder that had my original GitHub repository and switch it over to the new Tangled remote URL:
git remote set-url origin git@tangled.sh:claycow.com/claycow
git push
The only thing that was a bit weird with this was that there were always two commits that needed to be pulled in and it just wouldnāt resolve itself with git pull
. So, I ended up running the following and it cleared them out:
git branch -r
git branch -u origin/main
git checkout -b main
git push -u origin main
Vercel & Deployment Workflow
Since Vercel doesnāt currently have a integration with Tangled, I had to remove my current connection with GitHub and utilize the Vercel CLI tool. I think I initially started by just reading the documentation and running vercel --prod
locally which deployed successfully.
Luckily, Tangled added the ability to have pipelines, similar to GitHub Actions, earlier this month. Before I actually read the documentation on them I just saw the tab for it in the repository and enabled it. I honestly thought that it was just going to work with my .github/workflows
directory but it obviously didnāt and I ended up having to rename the directory to .tangled/workflows
. I made that push thinking it would all work from there on out but Tangled also has a different way of writing workflows compared to GitHub Actions so I fucked around way too much before finding the proper documentation (donāt look at my commit history, itās kind of embarrassing š
). After fiddling with the workflow for a bit I ended up with this configuration that works for this website:
when:
- event: ["push", "pull_request"]
branch: ["main"]
engine: nixery
dependencies:
nixpkgs:
- nodejs
- perl
steps:
- name: Deploy to Vercel
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
command: |
npx vercel pull --yes --environment=production --token=$VERCEL_TOKEN
npx vercel build --prod --token=$VERCEL_TOKEN
npx vercel deploy --prebuilt --prod --token=$VERCEL_TOKEN
The above should take any website built with Nodejs and NPM with a Vercel project and deploy it. You will have to set the secrets for the CLI tool but itās pretty easy after you figure out where to find them. I used part of this blog to figure out which enironment variables I needed and what to name them.
Some things I will call out is that you should specify the engine
otherwise when you push it will have a warning about including it. Also, I donāt know whether itās a required dependency for Astro or Vercel but for my current setup I had to add the perl
dependency. It took me awhile to figure out what dependencies were even available to me but I think this website tells you what is available since their runner is based on NixOS.
After all that, I saw the beautiful green checkmark next to my commit and that there was a recent build on my Vercel dashboard. Once I saw that, I made my original repository on GitHub private and I made a couple small changes on my local. Once I saw that the workflow successfully sent a build request to Vercel, I was able to go to claycow.com and see the updates.
Future Plans
Now that I got this website on Tangled, I think Iād like to add more things as this platform grows. Iāve always felt more free to express myself through my online, furry persona so it is really nice to have a place to contribute through it now. I hope to add more repositories on Tangled in the future and collaborate with some of my Bluesky mutuals and followers š.
On another note, Iām currently in the process of building my own server computer. Iāve been wanting one for awhile now, ever since I had my Framework 13 strapped to the wall by my router at the last place I lived, and Iām excited to put it together this weekend. Since Tangled allows for self-hosted Spindles, Iād love to eventually help support the platform by hosting one on my new server. I donāt really know how it works right now, if itās just hosted for me or it contributes to the network of pipeline requests, but I think itād be cool to try it out.
One thing relating to the future of this website, Iād like to eventually setup a way to statically build my Bluesky posts into pages as a way to keep a history, just in case Bluesky ever goes down. I think Iād have to implement some form of ISR since I wouldnāt want to pull all my posts everytime this site needs to be built, that would take forever and be a huge waste of resources.
If you got any questions, feel free to reach out via Bluesky or message me on Signal.
Comments š£ļø
Loading comments... ā°