Skip to content

Commit

Permalink
更改模板信息
Browse files Browse the repository at this point in the history
  • Loading branch information
postyizhan committed Mar 23, 2024
1 parent 44c8021 commit 5e4b6d8
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 75 deletions.
136 changes: 69 additions & 67 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,73 +23,75 @@ jobs:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages
FOLDER: build
# 自动生成PDF
pdf:
needs: [ gitpage ]
runs-on: ubuntu-latest
steps:
# 拉取代码
- name: Checkout
uses: actions/checkout@master
with:
persist-credentials: false
# 睡会儿, 等GitPage部署完成
- name: Sleep for 120 seconds
run: sleep 120s
shell: bash
# 生成PDF
- name: Build PDF
run: sudo docker run --rm -v ${{ github.workspace }}/pdf:/app/pdf iseason/docusaurus-to-pdf -u https://neige7.github.io/Banker-Wiki/intro --output pdf/Banker-Wiki.pdf
# 生成英文PDF
# - name: Build English PDF
# run: sudo docker run --rm -v ${{ github.workspace }}/pdf:/app/pdf iseason/docusaurus-to-pdf -u https://neige7.github.io/Banker-Wiki/en/intro --output pdf/Banker-Wiki-English.pdf
# 上传PDF
- name: Capture Build Artifacts
uses: actions/upload-artifact@v3
with:
name: Artifacts
path: pdf/
if-no-files-found: error
# Release
release:
needs: [ pdf ]
runs-on: ubuntu-latest
steps:
# 拉取代码
- name: Checkout Repository
uses: actions/checkout@v2
# 下载本体
- name: Download Content
uses: actions/download-artifact@v2
with:
name: Artifacts
# 获取序号
- name: Get Project version
id: get_version
run: |
echo "Project version: $GITHUB_RUN_NUMBER"
echo "::set-output name=project_version::$GITHUB_RUN_NUMBER"
env:
project_version: ${{ steps.get_version.outputs.project_version }}
# 创建release
- name: Create Release
id: create-new-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_version.outputs.project_version }}
release_name: Auto Release ${{ steps.get_version.outputs.project_version }}
# 向release上传Banker-Wiki.pdf
- name: Upload PDF file to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-new-release.outputs.upload_url }}
asset_path: Banker-Wiki.pdf
asset_name: Banker-Wiki.pdf
asset_content_type: application/zip

# # 自动生成PDF
# pdf:
# needs: [ gitpage ]
# runs-on: ubuntu-latest
# steps:
# # 拉取代码
# - name: Checkout
# uses: actions/checkout@master
# with:
# persist-credentials: false
# # 睡会儿, 等GitPage部署完成
# - name: Sleep for 120 seconds
# run: sleep 120s
# shell: bash
# # 生成PDF
# - name: Build PDF
# run: sudo docker run --rm -v ${{ github.workspace }}/pdf:/app/pdf iseason/docusaurus-to-pdf -u https://neige7.github.io/Banker-Wiki/intro --output pdf/Banker-Wiki.pdf
# # 生成英文PDF
# # - name: Build English PDF
# # run: sudo docker run --rm -v ${{ github.workspace }}/pdf:/app/pdf iseason/docusaurus-to-pdf -u https://neige7.github.io/Banker-Wiki/en/intro --output pdf/Banker-Wiki-English.pdf
# # 上传PDF
# - name: Capture Build Artifacts
# uses: actions/upload-artifact@v3
# with:
# name: Artifacts
# path: pdf/
# if-no-files-found: error
# # Release
# release:
# needs: [ pdf ]
# runs-on: ubuntu-latest
# steps:
# # 拉取代码
# - name: Checkout Repository
# uses: actions/checkout@v2
# # 下载本体
# - name: Download Content
# uses: actions/download-artifact@v2
# with:
# name: Artifacts
# # 获取序号
# - name: Get Project version
# id: get_version
# run: |
# echo "Project version: $GITHUB_RUN_NUMBER"
# echo "::set-output name=project_version::$GITHUB_RUN_NUMBER"
# env:
# project_version: ${{ steps.get_version.outputs.project_version }}
# # 创建release
# - name: Create Release
# id: create-new-release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ steps.get_version.outputs.project_version }}
# release_name: Auto Release ${{ steps.get_version.outputs.project_version }}
# # 向release上传Banker-Wiki.pdf
# - name: Upload PDF file to Release
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create-new-release.outputs.upload_url }}
# asset_path: Banker-Wiki.pdf
# asset_name: Banker-Wiki.pdf
# asset_content_type: application/zip

# 向release上传Banker-Wiki-English.pdf
# - name: Upload PDF file to Release
# uses: actions/upload-release-asset@v1
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Docusaurus 插件文档模板

[点击查看](https://neige7.github.io/Wiki-Template/)
[点击查看](https://postyizhan.github.io/Wiki-Template/)
14 changes: 7 additions & 7 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ const config = {
favicon: 'img/favicon.ico',

// Set the production url of your site here
url: 'https://neige7.github.io',
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: 'neige7', // Usually your GitHub org/user name.
organizationName: 'postyizhan', // Usually your GitHub org/user name.
projectName: 'Wiki-Template', // Usually your repo name.
deploymentBranch: 'gh-pages',
trailingSlash: false,
Expand All @@ -43,7 +43,7 @@ const config = {
sidebarPath: require.resolve('./sidebars.js'),
routeBasePath: '/',
editUrl:
'https://github.com/Neige7/Wiki-Template/blob/main'
'https://github.com/postyizhan/Wiki-Template/blob/main'
},
blog: false,
theme: {
Expand Down Expand Up @@ -78,7 +78,7 @@ const config = {
position: 'right',
},
{
href: 'https://github.com/Neige7/Wiki-Template',
href: 'https://github.com/postyizhan/Wiki-Template',
label: 'GitHub',
position: 'right',
},
Expand Down Expand Up @@ -106,7 +106,7 @@ const config = {
items: [
{
label: 'QQ群',
href: 'https://jq.qq.com/?_wv=1027&k=QKurhX6E',
href: 'https://qm.qq.com/q/dENGavSflK',
},
],
},
Expand All @@ -115,7 +115,7 @@ const config = {
items: [
{
label: 'GitHub',
href: 'https://github.com/Neige7/Wiki-Template',
href: 'https://github.com/postyizhan/Wiki-Template',
},
],
},
Expand All @@ -133,7 +133,7 @@ const config = {
respectPrefersColorScheme: true,
},
}),

themes: [
[
require.resolve("@easyops-cn/docusaurus-search-local"),
Expand Down

0 comments on commit 5e4b6d8

Please sign in to comment.