-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add GitHub Actions and custom dir sections to Publish doc page #160
Changes from 2 commits
c26b7ce
98fe39b
2ada6bc
fbc5ef6
25ab4a0
1ae03de
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,21 @@ If you are using git and Github pages, you can publish your doc website with one | |
|
||
Otherwise, you can run `moonwave build`, and your built website will be in a folder called `build` in your project directory. | ||
|
||
## Using GitHub Actions | ||
|
||
When you publish your doc via GitHub Actions you might need to provide the author details and GitHub token. | ||
|
||
```yaml | ||
- name: Publish | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would include the full example of a Moonwave GitHub Action, and move it down on the page since it has low importance. It's nice to include a working example of things to prevent confusion, we can also specify where they should put this in their repository in the description for this section. |
||
run: | | ||
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Your Name" | ||
moonwave build --publish | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
``` | ||
|
||
:::caution | ||
Remember to add the `build` folder to your `.gitignore`! | ||
::: | ||
|
@@ -46,4 +61,12 @@ Even if you are using Github Pages, and: | |
|
||
## Github Pages Custom Domain CNAME file | ||
|
||
Github Pages requires you to create a CNAME file in your website to host on a custom domain. You should create this file at `yourProjectRoot/.moonwave/static/CNAME` (create the folders if they don't exist) and put your domain in the file. | ||
Github Pages requires you to create a CNAME file in your website to host on a custom domain. You should create this file at `yourProjectRoot/.moonwave/static/CNAME` (create the folders if they don't exist) and put your domain in the file. | ||
|
||
## Custom build directory | ||
|
||
You can set a custom build directory instead of the default `build` if needed by passing the `--out-dir` argument to `moonwave build` command. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it would make more sense to mention the |
||
|
||
```sh | ||
moonwave --out-dir=custom_dir build | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't actually need to provide your own email and username, you can just provide the GitHub Actions username and email,
github-actions-bot
and[email protected]
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah maybe you're right. I assumed the same (usually works fine with mock bot address) but got "Failed to get the author data" errors. Maybe it was just me and by default the workflow is just fine with mock author data.