-
Hi, I want to build my docs website from the the ./docs directory in my project. I started by trying to use the just-the-docs-template and moving all the files (except the .github/workflows directory and its contents) to a directory at ./docs. I can't figure out how to modify the build and deploy workflow to look to the docs directory instead of the project root. I may be trying to use the template in an unintended way, or maybe there is a really simple solution to what I'm trying to achieve. Any guidance would be helpful. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Thanks for submitting a question @rtreddick! This is certainly a common use-case, and I'm sure others are wondering the same thing.
If I'm understand your problem correctly, there's a handful of ways to do this; the suggested way is probably to change the default working directory for an Action, ex in jobs:
# Build job
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
steps:
# ... You could also Let me know if this helps / if you have a follow-up! |
Beta Was this translation helpful? Give feedback.
-
I finally got it to work! Here are the steps I took:
|
Beta Was this translation helpful? Give feedback.
-
Thanks for following up. Yeah, I can document this! I will take a look at
the docs this weekend and think about where it might best fit and put it in
a PR. Or if you have any suggestions, let me know.
…On Tue, Feb 28, 2023 at 11:21 AM Matt Wang ***@***.***> wrote:
Ah! First of all, glad you got it to work! I didn't realize that it was
more complicated than just setting the working-directory, sorry about
that. I'm curious why Actions doesn't automatically forward the working
directory to setup-ruby (there must be a good reason). I appreciate you
diving in to this, I'm sure it'll be helpful for others.
Follow-up Q: do you think we should document this somewhere? If so, happy
to accept a PR for this so others don't have the same frustration in the
future!
—
Reply to this email directly, view it on GitHub
<#1183 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMLXAKUJ6PB6ERQWEIVNK3TWZYQXFANCNFSM6AAAAAAVIRQLXE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
.com>
|
Beta Was this translation helpful? Give feedback.
I finally got it to work! Here are the steps I took:
change default working-directory for the runner as you suggested
pass in a working-directory param to the ruby/setup-ruby action
pass in a path param to actions/upload-pages-artifact action