Comments (6)
So I need somewhere else to keep that .db file in between runs.
A few options:
- The GitHub Actions cache. I'm worried about this though as there are no guarantees on how long that will last.
- GitHub Action artifacts. These last for 90 days. https://docs.github.com/en/actions/configuring-and-managing-workflows/persisting-workflow-data-using-artifacts
- An S3 bucket somewhere
- Another GitHub repository!
That last option is tempting but feels a bit rude - that's going to end up being an enormous .git
history. Though I guess I could flatten the history every time I store a file there...
from til.
I'm going to try doing this with artifacts first, mainly to learn how to use them.
from til.
Not sure that will work:
Note: You can only download artifacts in a workflow that were uploaded during the same workflow run.
from til.
I could also migrate the site to Google Cloud Run.
from til.
Got this working! The latest til.db
file is now stored in https://github.com/simonw/til-db - every time I push a new copy of the file there I use git commit --amend
to rewrite history followed by git push --force
- so that repo only ever contains a single commit which is the commit that added the file.
til/.github/workflows/build.yml
Lines 18 to 23 in 1e29c3f
Then later:
til/.github/workflows/build.yml
Lines 80 to 86 in 1e29c3f
from til.
I was using a slightly modified version of this solution with great joy for a while, but eventually ran into a couple of issues. The main one is that the sqlite file outgrew its britches, even without tracking its history.
I ended up using GitHub Releases instead, which has a 2GB single file limit.
See my workflow file here.
The overall architecture is now three repos: one for code, one for flat files, and one for the db. I could probably get rid of the db repo and include the sqlite file as a release in either of the other repos as well.
Cheers, and thanks for all the inspiration. Happy to take any suggestions as well.
P.S. Using a separate repo for flat files (JSON, here) yields a bit of a free, hosted NoSQL backend. I think it's a fun pattern.
from til.
Related Issues (20)
- API rate limit exceeded for user ID 9599 HOT 8
- Atom feed by topic HOT 3
- Fix the /GraphQL topic page HOT 4
- Social image broken for latest entry HOT 9
- Mastodon <> GitHub verification is outdated
- Correction to github/migrate-github-wiki
- macos/atuin - --disable-up-arrow option
- Use DuckDB to convert parquet to JSON
- Dolly not using GPU
- Search for recent comments on an HN article
- `jc` for git logs to json
- Deploys failing - greater than 50MB HOT 8
- Move post card images to S3 HOT 16
- Social media cards missing syntax highlighting HOT 4
- Social media cards should not display raw markdown HOT 6
- Related content using embeddings HOT 7
- Less margin/padding on smaller screens HOT 6
- Fragment links on headings HOT 8
- Avoid retaking all screenshots on publish unless strictly necessary HOT 6
- GitHub Markdown API changed and broke my links HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from til.