forked from Tianji-Server/Docusaurus-Wiki
-
Notifications
You must be signed in to change notification settings - Fork 2
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
49e70c3
commit 1529c68
Showing
11 changed files
with
106 additions
and
9 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,25 @@ | ||
image: node:20.12.1 | ||
|
||
stages: | ||
- test | ||
- deploy | ||
|
||
test: | ||
stage: test | ||
script: | ||
- npm install | ||
- npm run build | ||
rules: | ||
- if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH | ||
|
||
pages: | ||
stage: deploy | ||
script: | ||
- npm install | ||
- npm run build | ||
- mv ./build ./public | ||
artifacts: | ||
paths: | ||
- public | ||
rules: | ||
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH |
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,5 +1,5 @@ | ||
--- | ||
sidebar_position: 6 | ||
sidebar_position: 7 | ||
--- | ||
|
||
# 下载仓库 | ||
|
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,5 +1,5 @@ | ||
--- | ||
sidebar_position: 7 | ||
sidebar_position: 8 | ||
--- | ||
|
||
# 下载依赖 | ||
|
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,5 +1,5 @@ | ||
--- | ||
sidebar_position: 5 | ||
sidebar_position: 6 | ||
--- | ||
|
||
# 下载安装nodejs | ||
|
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,5 +1,5 @@ | ||
--- | ||
sidebar_position: 11 | ||
sidebar_position: 12 | ||
--- | ||
|
||
# 开冲 | ||
|
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,5 +1,5 @@ | ||
--- | ||
sidebar_position: 8 | ||
sidebar_position: 9 | ||
--- | ||
|
||
# 更改各种路径 | ||
|
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,5 +1,5 @@ | ||
--- | ||
sidebar_position: 10 | ||
sidebar_position: 11 | ||
--- | ||
|
||
# 自动生成pdf文件 | ||
|
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,5 +1,5 @@ | ||
--- | ||
sidebar_position: 9 | ||
sidebar_position: 10 | ||
--- | ||
|
||
# 自动生成网页 | ||
|
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,5 +1,5 @@ | ||
--- | ||
sidebar_position: 4 | ||
sidebar_position: 5 | ||
--- | ||
|
||
# 设置Action权限 | ||
|
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,70 @@ | ||
--- | ||
sidebar_position: 3 | ||
--- | ||
|
||
在gitlab那边导入这个仓库,或者你把这个仓库下载下来,传gitlab上 | ||
|
||
[.gitlab-ci.yml](/.gitlab-ci.yml) 驿站帮你写好了awa | ||
|
||
然后把 [docusaurus.config.js](/docusaurus.config.js) 里的东西改下 | ||
|
||
:::tip | ||
|
||
在GitLab那一侧的仓库改 | ||
|
||
::: | ||
|
||
找到这一段 | ||
|
||
``` | ||
title: 'Wiki-Template', | ||
tagline: 'Docusaurus 插件文档模板', | ||
favicon: 'img/favicon.ico', | ||
// Set the production url of your site here | ||
url: 'https://postyizhan.github.io', | ||
// Set the /<baseUrl>/ pathname under which your site is served | ||
// For GitHub pages deployment, it is often '/<projectName>/' | ||
baseUrl: '/Wiki-Template/', | ||
// GitHub pages deployment config. | ||
// If you aren't using GitHub pages, you don't need these. | ||
organizationName: 'postyizhan', // Usually your GitHub org/user name. | ||
projectName: 'Wiki-Template', // Usually your repo name. | ||
deploymentBranch: 'gh-pages', | ||
trailingSlash: false, | ||
}; | ||
``` | ||
|
||
postyizhan 改成你自己的 `username/groupname` | ||
|
||
`github.io` 改成 `gitlab.io` | ||
|
||
`Wiki-Template` 改成 `username/groupname` | ||
|
||
`baseUrl` 改成 `/` | ||
|
||
`projectName` 改成 `username/groupname` 而不是 你这个文档仓库的名字 | ||
|
||
`` | ||
|
||
比如我的是改成这样 | ||
|
||
``` | ||
title: 'Wiki-Template', | ||
tagline: 'Docusaurus 插件文档模板', | ||
favicon: 'img/favicon.ico', | ||
// Set the production url of your site here | ||
url: 'https://yizhan.gitlab.io', | ||
// Set the /<baseUrl>/ pathname under which your site is served | ||
// For GitHub pages deployment, it is often '/<projectName>/' | ||
baseUrl: '/', | ||
// GitHub pages deployment config. | ||
// If you aren't using GitHub pages, you don't need these. | ||
organizationName: 'postyizhan', // Usually your GitHub org/user name. | ||
projectName: 'yizhan', // Usually your repo name. | ||
deploymentBranch: 'gh-pages', | ||
trailingSlash: false, | ||
``` |