Self-hosted runners action-runner folder #25972
-
I setup a self-hosted runner on a Windows 19 box and I’d like to use it for production deployment. (hopefully I’m using it properly) I have my YML setup so that when a push goes into master, it runs a few cmds including an npm build and an a PM2 restart. What I don’t understand is that my actions and code run within a new action-runner folder:
But my application is being served from another directory:
How to do I get my action changes to take place or reflect in the served location, not the _work directory? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
The default working directory of your workflow when using your self-hosted runner is
|
Beta Was this translation helpful? Give feedback.
-
ahh, thank you, I’ll give this a try |
Beta Was this translation helpful? Give feedback.
-
Hi Yanjingzhu, thanks for your help. I have it working at the proper working-directory now, but my entire application is also still in the default directory… Any idea if I can remove that?
|
Beta Was this translation helpful? Give feedback.
-
Sorry for the delay response. Actions/checkout action checks-out your repository under
|
Beta Was this translation helpful? Give feedback.
The default working directory of your workflow when using your self-hosted runner is
C:\actions-runner\_work\your-repo-name\your-repo-name
. If you are using run scripts step, using theworking-directory
keyword, you can specify the working directory of where to run the command.