Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"no rust project found" in Gitlab Pages CI #610

Open
Waridley opened this issue Sep 30, 2023 · 7 comments
Open

"no rust project found" in Gitlab Pages CI #610

Waridley opened this issue Sep 30, 2023 · 7 comments
Labels

Comments

@Waridley
Copy link

I'm trying to deploy a game jam project to Gitlab Pages using Trunk, but no matter what I do it only copies the assets folder and index.html, and doesn't build the Rust project.

Here's an example job log:
https://gitlab.com/Waridley/pac-ghoul/-/jobs/5198168518

I'm not sure if it's related to the fact that the rust project is not in the root of the repository, but in the rs folder. However, it is finding Trunk.toml just fine in the same folder.

@KiritoMC03
Copy link

@Waridley Hi!
I ran into the same problem. It has a very trivial solution. You need to move your index.html file to the same level as Cargo.toml.
This is because in the current version (0.17.5) trunk does the following to find the project path:
let path = html_dir.join("Cargo.toml");
image

@Waridley
Copy link
Author

@Waridley Hi!
I ran into the same problem. It has a very trivial solution. You need to move your index.html file to the same level as Cargo.toml.

Mine is, though. I even added an ls to the CI to verify that it could see all of the files. They are in the rs folder, so not the root of the repo, but all in the same folder:
Screenshot_20231014-152201.png

@ctron
Copy link
Collaborator

ctron commented Oct 19, 2023

Not sure about the exact layout of your project, but there's a way to influence this lookup: https://trunkrs.dev/assets/#rust

@adrianncovaci
Copy link

In my case, let metadata = match spawn_blocking(move || cmd.exec()) failed because CARGO env variable was not set up, maybe that helps.

@pedroapero
Copy link

In my case, I added <link data-trunk rel="rust" href="/Cargo.toml" />; it moved on to another issue (failed to open the cargo registry index). I eventually switched to running it as root to solve the latter.

@Waridley
Copy link
Author

Waridley commented Nov 8, 2023

In my case, I added <link data-trunk rel="rust" href="/Cargo.toml" />; it moved on to another issue (failed to open the cargo registry index). I eventually switched to running it as root to solve the latter.

That worked, thank you.

Of course it would still be nice to know the root cause and prevent this from happening to others if possible.

Copy link

github-actions bot commented Dec 9, 2023

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants