Hello, I’m remaking my site using 11ty and thought to start using the Deploy to Neocities workflow. I’m using the Forgejo instance and I just can’t get the action to work properly.
The action is stuck on runs on: ubuntu-latest and I found that unlike Github, Forgejo doesn’t have any runners. They need to be installed (guide).
My question then is, there is a sane way to use Actions on Forgejo or should I just mirror my repo to Github and trigger the workflow there?
Forgejo actions requires us to set up runner infrastructure on the backend, which we have not done. It may be something we offer in the future but there are not plans to do so right now. Your best bet is to mirror to another git server which offers runners
Thank you so much for going through the trouble! I tried following the guide and I got stuck on Step 3. I managed to " open an empty file called post-commit inside the .githooks directory." I typed the script both by copying the code (the lines with the numbers and the command at the beginning) but nothing happened after typing bash .githooks/post-commit under it. I’m using Git Bash on Windows.
I also tried typing that command on another terminal window but it sent a message that the .githooks directory was empty.
When I typed the bash .githooks/post-commit on another terminal window? Probably, now that you mention it. I don’t know how to move across directories using the terminal without a guide after all.
@ArimaMary, here are some basics to help you along when using Git bash:
type pwd to see where you currently are.
type cd <directory-name> to change to that directory.
type cd .. to move up to the directory that contains the current directory.
type ls -Al to see what’s in the current directory.
If pwd shows that you’re in .githooks, then try typing bash ./post-commit to test it. In a path like ./post-commit, the dot and then the slash tell the shell to look for that file in the current directory.
Hopefully this gets you unstuck. I probably should have asked about your experience level before I started writing this tutorial. Sorry about that.
Testing guide on a whole new directory. I used the terminal to create the directory website and followed the guide back to step 3. With the terminal, I managed to reach .githooks directory before opening another bash terminal, copying the script, and editing it a little such as replacing the project’s path and removing the numbers on each line of the code (not sure if I was supposed to do this).
I have the script on a terminal using bash and in another one, I managed to reach the .githooks directory.
Typing bash ./post-commit on the latter terminal gives me the message bash: ./post-commit: No such file or directory. Similarly, typing ls -Al gives me the response total 0 which I assume means there’s no file in the .githooks directory.
Attaching screenshots with contents of both terminals.
Yes, you can, @ArimaMary. Being in the same directory means you should try bash ./post-commit. As I had mentioned before ./ means “look for the file in the current directory”.