Closed zkkzkk32312 closed 3 months ago
Yes, please use v4 and report back. I'll update the README accordingly based on your test result. :)
hey thanks for the quick reply, after using v4, I got an error with exit code 128.
no detail was given.
after using v4, I got an error with exit code 128.
no detail was given.
That is strange. How did you modify your workflow file? Note that the actions/checkout
usage is officially documented here.
im very new to github actions, so its very possible its my own mistake, but here is my current .yml:
name: Deploy Public Folder with GithubPageOverwriter
on: push: branches: ["main"]
workflow_dispatch:
jobs: publish: runs-on: ubuntu-latest steps:
name: Check out uses: actions/checkout@v4
name: Publish current workdir (which contains generated content) to GitHub Pages uses: rayluo/github-pages-overwriter@v1.3
with:
source-directory: ./public
target-branch: gh-pages
OK, so you are no longer seeing the initial "Node.js 16 ..." error. Then, your "actions/checkout@v4" change was good.
The "exit code 128" is an irrelevant error. You may try change your "./public" to "public" and retry.
thanks for the info, after modifying the line to : source-directory: public
I am still getting the exit code 128 error.
but using v4 was required to get rid of nodejs error for sure.
You are hitting this error. Honestly I am not sure where it came from. Can you double check whether you enabled github pages for your project already? That is like a prerequisite. You may refer to the "2. In your Github Pages setting, ..." paragraph in GPO's readme.
@rayluo hey thanks for pointing that out, turns out I need to
Check if "Read and write permissions" are enabled in Settings -> Actions -> General -> Workflow permissions:
Thanks for sharing. Good to know. Presumably, adding the "permissions" and "contents: ..." lines as below might be able to also get it working WITHOUT checking that "Read and write permissions" setting. It could be a more deterministic pattern to ensure your future projects using GPO smoothly. You may give it a shot. :-)
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out
# You may use a newer version of https://github.com/actions/checkout
uses: actions/checkout@v4
......
got this error when running the action/workflow
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3
maybe need to use v4?