https://github.com/ilmalte/github-actions-with-sqlite
A Typescript page, compiled with Web Assembly and dynamically deployed on Github Pages. It displays random data from a sqlite database, populated by a simple Python script scheduled with Github Actions.
https://github.com/ilmalte/github-actions-with-sqlite
github-actions github-page python sqlite3 typescript webassembly
Last synced: 11 months ago
JSON representation
A Typescript page, compiled with Web Assembly and dynamically deployed on Github Pages. It displays random data from a sqlite database, populated by a simple Python script scheduled with Github Actions.
- Host: GitHub
- URL: https://github.com/ilmalte/github-actions-with-sqlite
- Owner: ilmalte
- Created: 2021-05-08T21:39:40.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-16T10:24:18.000Z (over 1 year ago)
- Last Synced: 2025-04-06T00:32:12.823Z (over 1 year ago)
- Topics: github-actions, github-page, python, sqlite3, typescript, webassembly
- Language: HTML
- Homepage: https://ilmalte.github.io/github-actions-with-sqlite/
- Size: 15.6 MB
- Stars: 7
- Watchers: 2
- Forks: 4
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://github.com/ilmalte/test-sqlite/actions/workflows/add_activities_to_db.yml)
[](https://github.com/ilmalte/test-sqlite/actions/workflows/continuous-integration-workflow.yml)
# SIMPLE SQLITE SCRIPT SCHEDULED WITH GITHUB ACTIONS
This repo only wants to be a super simple test of sqlite, Github Actions and Github Pages!
A Github Action adds random records on a sqlite db every 6 hours.
Then a Typescript page, compiled in WebAssembly, displays data randomly using sql.js-httpvfs (a wrapper around sql.js to provide a read-only HTTP-Range-request based virtual file system for SQLite).
sql.js-httpvfs is amazing because allows hosting an SQLite database on a static file hoster and querying that database from the browser without fully downloading it.
## How to launch
In the package.json you can find a script to help you during the development process.
You only need to launch the following commands in your Linux terminal (WSL as well).
`
npm install # if needed
`
`
npm run dev
`
## How to build
If you want to build this you need to run the following commands:
`
cd ./ui
`
`
npm install # if needed
`
`
npm run build-prod
`
## CI with Github Actions
Thanks to a Github Action, every push on master launches a job that deployes a build on the branch "gh-pages".
In this way you can have a working version of this repo on the following url:
https://ilmalte.github.io/github-actions-with-sqlite/
## I recently discovered this official documentation with more resources about this topic
Here you can find the documentation for the SQLite project's WebAssembly- and JavaScript-related APIs, which enable the use of sqlite3 in modern WASM-capable browsers:
https://sqlite.org/wasm/doc/trunk/index.md