sauloxd / review-apps Goto Github PK
View Code? Open in Web Editor NEWManage MULTIPLE static applications in your github-pages
License: MIT License
Manage MULTIPLE static applications in your github-pages
License: MIT License
Seeing this error message, looks like you need to bump the @actions/core
package maybe?
/usr/bin/git config --global user.name review-app-action-user
/usr/bin/git config --global user.email review-app-action-email
/usr/bin/git config pull.rebase true
Error: Unable to process command '::set-env name=PUBLIC_URL::<hidden>' successfully.
Error: The `set-env` command is disabled. Please upgrade to using Environment Files or opt into unsecure command execution by setting the `ACTIONS_ALLOW_UNSECURE_COMMANDS` environment variable to `true`. For more information see: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
When running in GitHub Actions, the build-cmd is unnecessary, because I can just add a build step before the uses
step. The build-cmd input also can't do things like cd demo && pnpm run build && touch .nojekyll
, so I had to build it before the step and change the build-cmd to echo "Already built"
. It would be easier if I could just not specify build-cmd and it didn't run it.
Running the job yields the following warning:
The following actions uses Node.js version which is deprecated and will be forced to run on node20: sauloxd/[email protected]. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
We want to create review apps, but don't want to remove the existing index.html --- Can we have an option to skip index.html creation?
Here's the link to the failed run with debug logging enabled: https://github.com/ItsSunnyMonster/merge/actions/runs/10119347055/job/27987710478
Here's the logs from the job with debug logging enabled (should also be available in the link above)
##[debug]Evaluating condition for step: 'Build and deploy docs'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Build and deploy docs
##[debug]Loading inputs
##[debug]Evaluating: secrets.GITHUB_TOKEN
##[debug]Evaluating Index:
##[debug]..Evaluating secrets:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'GITHUB_TOKEN'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Loading env
Run sauloxd/review-apps@v[2](https://github.com/ItsSunnyMonster/merge/actions/runs/10119347055/job/27987710478#step:4:2).0.0
##[debug]CALL run
##[debug]WITH []
-> Review Apps start!
-> Your input:
-> Validating user input
-> {
"dist": "dist",
"slug": "review-apps",
"ghPagesBranch": "gh-pages",
"buildCmd": "",
"githubToken": "***",
"skipIndexHtml": false,
"tmpDir": ".tmp-review-apps",
"apps": [
{
"slug": "docs",
"build": "cargo doc --no-deps",
"dist": "target/doc/merge"
}
]
}
/usr/bin/git --version
git version 2.45.2
/usr/bin/git config --global user.name ReviewApps admin
/usr/bin/git config --global user.email [email protected]
/usr/bin/git config pull.rebase true
/usr/bin/echo .tmp-review-apps >> .git/info/exclude
.tmp-review-apps >> .git/info/exclude
##[debug]CALL syncApps
##[debug]WITH [
##[debug] {
##[debug] "repository": {
##[debug] "name": "merge",
##[debug] "owner": "ItsSunnyMonster"
##[debug] },
##[debug] "branch": {
##[debug] "name": "refs/heads/master",
##[debug] "headCommit": "f6a[3](https://github.com/ItsSunnyMonster/merge/actions/runs/10119347055/job/27987710478#step:4:3)f7cc9dad1853bfce46de3785f1d0ee679da9",
##[debug] "pullRequest": {}
##[debug] }
##[debug] }
##[debug]]
-> Your apps will be hosted in github pages:
-> "https://ItsSunnyMonster.github.io/merge"
/usr/bin/git fetch origin refs/heads/master
From https://github.com/ItsSunnyMonster/merge
* branch master -> FETCH_HEAD
/usr/bin/git checkout -f refs/heads/master
Note: switching to 'refs/heads/master'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at f6a3f7c ci: fix rust toolchain
/usr/bin/git reset --hard origin/refs/heads/master
fatal: ambiguous argument 'origin/refs/heads/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Error: FAILED syncApps
##[debug]The process '/usr/bin/git' failed with exit code 128
Error: FAILED run
##[debug]The process '/usr/bin/git' failed with exit code 128
/home/runner/work/_actions/sauloxd/review-apps/v2.0.0/packages/action/webpack:/node_modules/@actions/exec/lib/toolrunner.js:592
error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);
^
Error: The process '/usr/bin/git' failed with exit code 128
at ExecState._setResult (/home/runner/work/_actions/sauloxd/review-apps/v2.0.0/packages/action/webpack:/node_modules/@actions/exec/lib/toolrunner.js:592:1)
at ExecState.CheckComplete (/home/runner/work/_actions/sauloxd/review-apps/v2.0.0/packages/action/webpack:/node_modules/@actions/exec/lib/toolrunner.js:575:1)
at ChildProcess.<anonymous> (/home/runner/work/_actions/sauloxd/review-apps/v2.0.0/packages/action/webpack:/node_modules/@actions/exec/lib/toolrunner.js:[4](https://github.com/ItsSunnyMonster/merge/actions/runs/10119347055/job/27987710478#step:4:4)69:1)
at ChildProcess.emit (node:events:[5](https://github.com/ItsSunnyMonster/merge/actions/runs/10119347055/job/27987710478#step:4:5)19:28)
at maybeClose (node:internal/child_process:1105:1[6](https://github.com/ItsSunnyMonster/merge/actions/runs/10119347055/job/27987710478#step:4:6))
at Process.ChildProcess._handle.onexit (node:internal/child_process:305:5)
##[debug]Node Action run completed with exit code 1
##[debug]Finishing: Build and deploy docs
Hi, there!
We are using this action to deploy our review apps for Pull Requests and it is working quite nicely for the most part. The action runs and creates the new Github page successfully.
The problem comes right after the folder is successfully created in our gh-pages
branch. It's trying to fetch the origin of the original PR branch and fails.
At first glance, it looks like it is only grabbing the branch name after the /
.
For example... we have a branch called feat/migrate-to-github-actions
. Creating a PR against our main branch, everything works perfectly fine. All of our tests run, the review app kicks off, and then creates our new folder in our gh-pages
directory.
Then the action throws an error, because it's trying to fetch origin on migrate-to-github-actions
and not feat/migrate-to-github-actions
where our actual branch is. A real example error encounter and output can be seen below:
/usr/bin/git push origin gh-pages
To https://github.com/orgNameRedacted/repoNameRedacted
86a2253..a75c6a5 gh-pages -> gh-pages
/usr/bin/git fetch origin migrate-to-github-actions
fatal: couldn't find remote ref migrate-to-github-actions
Error: The process '/usr/bin/git' failed with exit code 128
(node:14081) UnhandledPromiseRejectionWarning: Error: The process '/usr/bin/git' failed with exit code 128
at ExecState._setResult (/home/vsts-agent/actions-runner/_work/_actions/sauloxd/review-apps/v1.3.3/packages/action/dist/index.js:1026:25)
at ExecState.CheckComplete (/home/vsts-agent/actions-runner/_work/_actions/sauloxd/review-apps/v1.3.3/packages/action/dist/index.js:1009:18)
at ChildProcess.<anonymous> (/home/vsts-agent/actions-runner/_work/_actions/sauloxd/review-apps/v1.3.3/packages/action/dist/index.js:903:27)
at ChildProcess.emit (events.js:210:5)
at maybeClose (internal/child_process.js:1021:16)
at Socket.<anonymous> (internal/child_process.js:430:11)
at Socket.emit (events.js:210:5)
at Pipe.<anonymous> (net.js:659:12)
(node:14081) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:14081) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(I redacted org and repo name above since the is for a private setup)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.