deb-sig / deg-online

double-entry-generator web.
https://deg-online.pages.dev/
0 stars 2 forks source link

feat: add CI for `deg-online` #2

Open Triple-Z opened 1 year ago

Triple-Z commented 1 year ago

This repo is for hosting static files by GitHub Pages for now.

Currently, the web code files are in double-entry-generator/wasm, because the web page needs the wasm binary, which would be made by double-entry-generator project.

FYI, I have used the following several operations to create a deg-online GH Pages release:

$ cd ~/Code/double-entry-generator
$ make build-wasm
# wasm release files are created at `wasm-dist` directories, like wasm binary, html, wasm_exec.js in Go etc.

$ mv wasm-dist/* ~/Code/deg-online/
$ cd ~/Code/deg-online
$ git add .; git commit -s; git push

Indeed this is a bad way to deploy new web releases. I suggest the following workflow for the future:

  1. Build and push WASM binary, wasm_exec.js from Go build environment (in GitHub Action, maybe) to deg-online's main branch when a release is created in double-entry-generator.
  2. Build the web application (on every pushes to the main branch) in deg-online and push the web artifacts (dist directory for Vue) to deg-online's gh-pages branch, which the GitHub Action uses.

/cc @gaocegege

Originally posted by @Triple-Z in https://github.com/deb-sig/deg-online/issues/1#issuecomment-1364022457

Triple-Z commented 1 year ago

The current version has deployed on https://deg-online.pages.dev/ via CloudFlare Pages.

@gaocegege @VoVAllen