Skip to content

Commit

Permalink
fix: 每次构建前同步主仓库文档,并修正 Yarn v3 的配置 (#111)
Browse files Browse the repository at this point in the history
* fix: 完全移除文档残留,转为每次构建前同步主仓库文档

* ci: 修改build-test和部署的逻辑

ci: 修正文档位置

* build: 将lint移出build流程

* build: 迁移至 Yarn V3

chore: gitignore补全

* fix: 修正bundler.mjs中的路径

* ci: 更改node版本
  • Loading branch information
SherkeyXD authored Sep 1, 2023
1 parent 39706f9 commit 33455a1
Show file tree
Hide file tree
Showing 14 changed files with 12,926 additions and 17,037 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/azure-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ on:
push:
branches:
- main
- dev
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- dev
workflow_dispatch:

jobs:
Expand All @@ -19,14 +14,28 @@ jobs:
- name: Check out code
uses: actions/checkout@v3

- name: Fetch docs
uses: actions/checkout@v3
with:
repository: "MaaAssistantArknights/MaaAssistantArknights"
sparse-checkout: "docs"
path: "temp"
ref: "master"
fetch-depth: "1"

- name: Move and cleanup docs
run: |
mv ./temp/docs ./apps
rm -r ./temp
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: "yarn"

- name: Install dependencies
run: yarn
run: yarn install --immutable

- name: Build
run: yarn build
Expand Down
22 changes: 19 additions & 3 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ on:
push:
branches-ignore:
- main
- dev
pull_request:
types: [opened, synchronize, reopened, closed]
workflow_dispatch:

jobs:
build:
Expand All @@ -15,14 +17,28 @@ jobs:
- name: Check out code
uses: actions/checkout@v3

- name: Fetch docs
uses: actions/checkout@v3
with:
repository: "MaaAssistantArknights/MaaAssistantArknights"
sparse-checkout: "docs"
path: "temp"
ref: "master"
fetch-depth: "1"

- name: Move and cleanup docs
run: |
mv ./temp/docs ./apps
rm -r ./temp
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: "yarn"

- name: Install dependencies
run: yarn
run: yarn install --immutable

- name: Build
run: yarn build
136 changes: 123 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,39 +1,149 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# IDE files
.idea
.fleet
.vs
.vscode

# dependencies
node_modules
.pnp
.pnp.js

# misc
.DS_Store
desktop.ini
*.pem

# debug
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# local env files
.env.local
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# turbo
.turbo

# build
dist
*.tsbuildinfo
.yarn
apps/doc/.docusaurus
apps/doc/build
apps/docs
874 changes: 874 additions & 0 deletions .yarn/releases/yarn-3.6.3.cjs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-3.6.3.cjs
20 changes: 0 additions & 20 deletions apps/doc/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion apps/doc/README.md

This file was deleted.

25 changes: 0 additions & 25 deletions apps/doc/package.json

This file was deleted.

18 changes: 0 additions & 18 deletions apps/doc/sync.mjs

This file was deleted.

4 changes: 0 additions & 4 deletions apps/doc/tsconfig.json

This file was deleted.

2 changes: 1 addition & 1 deletion bundler.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const maaProjectLocationMapping = [
to: `${bundleBasePath}`,
},
{
from: './apps/doc/docs/.vuepress/dist',
from: './apps/docs/.vuepress/dist',
to: `${bundleBasePath}/docs`,
},
];
Expand Down
Loading

0 comments on commit 33455a1

Please sign in to comment.