yaptide / ui

Yet Another Particle Transport IDE - frontend
https://yaptide.github.io/web_dev/
GNU General Public License v3.0
9 stars 4 forks source link

Check size of web_dev deploy #1599

Closed grzanka closed 2 months ago

grzanka commented 2 months ago

Currently demo version is deployed to github pages instance https://yaptide.github.io/web_dev/

The GithubActions https://github.com/yaptide/ui/blob/af29cf9bdb6b0675589af3def9173e131987becd/.github/workflows/node.js.yml#L106 is pushing new version of JS bundle to gh branch in repo https://github.com/yaptide/web_dev

The deploy is handled by this step: https://github.com/yaptide/ui/blob/af29cf9bdb6b0675589af3def9173e131987becd/package.json#L81

For details see: https://www.npmjs.com/package/gh-pages

The crucial part describing what happens is here: image

We have already 638 commits there image

The repo grew to pretty large size:

@grzanka ➜ /workspaces/web_dev (main) $ du -hs .git/
64M     .git/
@grzanka ➜ /workspaces/web_dev (main) $ git pull
remote: Enumerating objects: 8391, done.
remote: Counting objects: 100% (8391/8391), done.
remote: Compressing objects: 100% (2879/2879), done.
remote: Total 8390 (delta 5023), reused 8346 (delta 4979), pack-reused 0
Receiving objects: 100% (8390/8390), 439.38 MiB | 17.08 MiB/s, done.
Resolving deltas: 100% (5023/5023), done.
From https://github.com/yaptide/web_dev
 * [new branch]      gh-pages   -> origin/gh-pages
Already up to date.
@grzanka ➜ /workspaces/web_dev (main) $ du -hs .git/
440M    .git/

Consider deploying the site without history by using --no-history option

@grzanka ➜ /workspaces/web_dev (main) $ npx gh-pages --help
Usage: gh-pages [options]

Options:
  -V, --version            output the version number
  -d, --dist <dist>        Base directory for all source files
  -s, --src <src>          Pattern used to select which files to publish (default: "**/*")
  -b, --branch <branch>    Name of the branch you are pushing to (default: "gh-pages")
  -e, --dest <dest>        Target directory within the destination branch (relative to the root) (default: ".")
  -a, --add                Only add, and never remove existing files
  -x, --silent             Do not output the repository url
  -m, --message <message>  commit message (default: "Updates")
  -g, --tag <tag>          add tag to commit
  --git <git>              Path to git executable (default: "git")
  -t, --dotfiles           Include dotfiles
  --nojekyll               Add a .nojekyll file to disable Jekyll
  --cname <CNAME>          Add a CNAME file with the name of your custom domain
  -r, --repo <repo>        URL of the repository you are pushing to
  -p, --depth <depth>      depth for clone (default: 1)
  -o, --remote <name>      The name of the remote (default: "origin")
  -u, --user <address>     The name and email of the user (defaults to the git config).  Format is "Your Name <email@example.com>".
  -v, --remove <pattern>   Remove files that match the given pattern (ignored if used together with --add). (default: ".")
  -n, --no-push            Commit only (with no push)
  -f, --no-history         Push force new commit without parent history
  --before-add <file>      Execute the function exported by <file> before "git add"
  -h, --help               display help for command
grzanka commented 2 months ago

Lets check if https://github.com/yaptide/ui/pull/1603 helped

grzanka commented 2 months ago

Seems fixed now

Screenshot 2024-04-21 at 13 09 09
grzanka commented 2 months ago
grzanka@MacBook-Air tmp % git clone https://github.com/yaptide/web_dev.git
Cloning into 'web_dev'...
remote: Enumerating objects: 120, done.
remote: Counting objects: 100% (91/91), done.
remote: Compressing objects: 100% (75/75), done.
remote: Total 120 (delta 15), reused 85 (delta 14), pack-reused 29
Receiving objects: 100% (120/120), 14.59 MiB | 361.00 KiB/s, done.
Resolving deltas: 100% (15/15), done.
grzanka@MacBook-Air tmp % cd web_dev 
grzanka@MacBook-Air web_dev % git checkout gh_pages
error: pathspec 'gh_pages' did not match any file(s) known to git
grzanka@MacBook-Air web_dev % git checkout gh-pages
branch 'gh-pages' set up to track 'origin/gh-pages'.
Switched to a new branch 'gh-pages'
grzanka@MacBook-Air web_dev % git pull
Already up to date.
grzanka@MacBook-Air web_dev % du -hs .git 
 15M    .git