Building a docsite outside the project folder and committing to branch #26934
-
So, I have this workflow that’s a work in progress. So I have 3 questions with this code 3: Does this workflow work? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @exorift , Thank you for being here! To answer your queries:
For the step ‘Build Resources’, the ‘npm run build’ command is executed under the GITHUB_WORKSPACE directory NOT ‘cyclone-engine-pages’.
Besides, github hosted runner will be released after workflow completed, if you only commit but not push back the change, no change will be saved after workflow. You can use action ‘ad-m/github-push-action’ to push the change, please check the usage of the action. Hence, your workflow should be not working. Besides, using the working-directory keyword, you can specify the working directory of where to run the command. Please check the doc for more details. Thanks. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the very clear answers! I forgot about Just 2 things to note, 1: |
Beta Was this translation helpful? Give feedback.
Hi @exorift ,
Thank you for being here! To answer your queries:
yes, you can manipulate the filesystem outside the project folder directory. For github hosted runner, you need to manually create the folder before you cd into.
run: |
mkdir …/cyclone-engine-pages cd …/cyclone-engine-pages
The default working directory is ‘GITHUB_WORKSPACE’, on ubuntu hosted runner, which typically stands for ‘/home/runner/work/repo/repo’, you can check with command ‘pwd’.
For the step ‘Build Resources’, the ‘npm run build’ command is executed under the GITHUB_WORKSPACE directory NOT ‘cyclone-engine-pages’.