-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5c940d3
commit 9e8a7be
Showing
3 changed files
with
56 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# gopxl documentation site generator | ||
|
||
[Go to the documentation](https://markkremer.github.io/gopxl-docs-generator/main/01.%20Getting%20Started/01.%20Installation.html) | ||
[Go to the documentation](https://gopxl.github.io/docs/main/01.%20Getting%20Started/01.%20Installation.html) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,55 @@ | ||
# Installation | ||
|
||
todo | ||
## Enable GitHub Pages | ||
|
||
In your repository on GitHub, go to Settings → Pages. | ||
Under Build and deployment → Source, change the option to `GitHub Actions`. | ||
|
||
## Create a GitHub Workflow | ||
|
||
In your project, create a GitHub Workflow file: | ||
```yaml | ||
# .github/workflows/github-pages.yml | ||
name: GitHub Pages | ||
|
||
on: | ||
push: | ||
branches: ['main'] | ||
tags: ['*'] | ||
|
||
jobs: | ||
|
||
upload-docs: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pages: write | ||
id-token: write | ||
env: | ||
DOCS_DIR: 'docs/' | ||
DEST_DIR: '_site/' | ||
BRANCH: 'main' | ||
steps: | ||
- uses: actions/configure-pages@v5 | ||
id: configure-pages | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ env.BRANCH }} | ||
fetch-depth: 0 # checkout a non-shallow copy so the generator can generate docs for all major versions | ||
- uses: gopxl/docs@main | ||
with: | ||
deploy-url: ${{ steps.configure-pages.outputs.base_url }} | ||
docs-directory: ${{ env.DOCS_DIR }} | ||
destination-directory: ${{ env.DEST_DIR }} | ||
- uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: ${{ env.DEST_DIR }} | ||
- uses: actions/deploy-pages@v4 | ||
``` | ||
The `DOCS_DIR` environment variable can be changed to point | ||
to the directory containing the MarkDown files. | ||
|
||
## View your website | ||
|
||
If your GitHub repository is hosted at `https://github.com/owner/project`, | ||
your GitHub Pages site will be available at `https://owner.github.io/project`. |