pygame-web / pygbag

python and pygame wasm for everyone ( packager + test server + simulator )
https://github.com/pygame-web
MIT License
339 stars 40 forks source link

Github workflow pygbag.yml prevents localhost server from running, even after removal #76

Closed elliottower closed 1 year ago

elliottower commented 1 year ago

I get this message whenever I try to run pygbag [repo_name] now, after I added the workflow yml file, pushed it to github to test, got a few errors I couldn't figure out, and then removed it.

Serving HTTP on 127.0.0.1 port 8000 (http://localhost:8000/) ... 127.0.0.1 - - [09/Mar/2023 17:08:36] "GET / HTTP/1.1" 200 - REPLACING /Users/elliottower/Documents/GitHub/gobblet-rl/build/web/index.html https://pygame-web.github.io http://localhost:8000/

Then when I try to click the link or load localhost:800 myself it just never loads the page.

Seems to be stuck replacing with github.io but it also uses the pygame web repository rather than my own, probably an environment variable issue or something.

Warnings and errors which I got when using the github action:

Warning: The set-output command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ (I couldn't find where it's used)

Build for Emscripten pygbag runtime Node.js 12 actions are deprecated. Please update the following actions to use Node.js 16: actions/checkout@v2, JamesIves/github-pages-deploy-action@4.1.7. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. (not sure how I would go about fixing this)

Errors:

Reset branch 'github-pages-deploy-action/ekxf7jq2v' /usr/bin/chmod -R 777 github-pages-deploy-action-temp-deployment-folder /usr/bin/git worktree remove github-pages-deploy-action-temp-deployment-folder --force Error: The deploy step encountered an error: The process '/usr/bin/git' failed with exit code 128 ❌

elliottower commented 1 year ago

Working on fixing the git issue with a private access token but I think it's definitely undesirable behavior to have the yml file permanently change how the package functions afterwards with no obvious way to fix it (tried building without the test server then running that but it didn't work, tried uninstalling pygbag)

elliottower commented 1 year ago

Okay I've solved the error with the yml file, it needs write permission. Can be added with a private token, or through github repo settings, or simply by changing

permissions:
  contents: read

to

permissions:
  contents: write