-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from bloxbean/docs_site
Documentation site setup with Github action
- Loading branch information
Showing
18 changed files
with
8,421 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Deploy to GitHub Pages | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'rel-docs*' | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy to GitHub Pages | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: yarn | ||
cache-dependency-path: "./docs/yarn.lock" | ||
|
||
- name: Install dependencies | ||
run: | | ||
cd docs | ||
yarn install --frozen-lockfile | ||
- name: Build website | ||
run: | | ||
cd docs | ||
yarn export | ||
# Popular action to deploy to GitHub Pages: | ||
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus | ||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
# Build output to publish to the `gh-pages` branch: | ||
publish_dir: ./docs/out | ||
cname: devkit.yaci.xyz | ||
# The following lines assign commit authorship to the official | ||
# GH-Actions bot for deploys to `gh-pages` branch: | ||
# https://github.com/actions/checkout/issues/13#issuecomment-724415212 | ||
# The GH actions bot is used by default if you didn't specify the two fields. | ||
# You can swap them out with your own user credentials. | ||
# user_name: github-actions[bot] | ||
# user_email: 41898282+github-actions[bot]@users.noreply.github.com |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Test deployment | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- develop | ||
jobs: | ||
test-deploy: | ||
name: Test deployment | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: yarn | ||
cache-dependency-path: "./docs/yarn.lock" | ||
|
||
- name: Install dependencies | ||
run: | | ||
cd docs | ||
yarn install --frozen-lockfile | ||
- name: Test build website | ||
run: | | ||
cd docs | ||
yarn export |
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 +1,3 @@ | ||
scripts/scala/*.sc | ||
/docs/node_modules/ | ||
/docs/.next |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Yaci DevKit Documentation | ||
|
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.counter { | ||
border: 1px solid #ccc; | ||
border-radius: 5px; | ||
padding: 2px 6px; | ||
margin: 12px 0 0; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Example from https://beta.reactjs.org/learn | ||
|
||
import { useState } from 'react' | ||
import styles from './counters.module.css' | ||
|
||
function MyButton() { | ||
const [count, setCount] = useState(0) | ||
|
||
function handleClick() { | ||
setCount(count + 1) | ||
} | ||
|
||
return ( | ||
<div> | ||
<button onClick={handleClick} className={styles.counter}> | ||
Clicked {count} times | ||
</button> | ||
</div> | ||
) | ||
} | ||
|
||
export default function MyApp() { | ||
return <MyButton /> | ||
} |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/image-types/global" /> | ||
|
||
// NOTE: This file should not be edited | ||
// see https://nextjs.org/docs/basic-features/typescript for more information. |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const withNextra = require('nextra')({ | ||
theme: 'nextra-theme-docs', | ||
themeConfig: './theme.config.tsx', | ||
}) | ||
|
||
module.exports = { | ||
...withNextra(), | ||
images: { | ||
unoptimized: true, | ||
} | ||
} |
Oops, something went wrong.