-
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 #2 from c121914yu/main
fastgptHome
- Loading branch information
Showing
149 changed files
with
28,929 additions
and
5,223 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,49 @@ | ||
name: Build xiaoyi page images in Personal warehouse | ||
on: | ||
workflow_dispatch: | ||
push: | ||
paths: | ||
- 'projects/xiaoyi/**' | ||
branches: | ||
- 'main' | ||
jobs: | ||
build-fastgpt-images: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
with: | ||
driver-opts: network=host | ||
- name: Cache Docker layers | ||
uses: actions/cache@v3 | ||
with: | ||
path: /tmp/.buildx-cache | ||
key: ${{ runner.os }}-buildx-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-buildx- | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GH_PAT }} | ||
- name: Set DOCKER_REPO_TAGGED based on branch or tag | ||
run: | | ||
echo "DOCKER_REPO_TAGGED=ghcr.io/${{ github.repository_owner }}/fastgpt-home:xiaoyi" >> $GITHUB_ENV | ||
- name: Build and publish image for main branch or tag push event | ||
env: | ||
DOCKER_REPO_TAGGED: ${{ env.DOCKER_REPO_TAGGED }} | ||
run: | | ||
cd projects/xiaoyi && docker buildx build \ | ||
--label "org.opencontainers.image.source=https://github.com/${{ github.repository_owner }}/FastGPT" \ | ||
--label "org.opencontainers.image.description=fastgpt-home image" \ | ||
--push \ | ||
--cache-from=type=local,src=/tmp/.buildx-cache \ | ||
--cache-to=type=local,dest=/tmp/.buildx-cache \ | ||
-t ${DOCKER_REPO_TAGGED} \ | ||
-f Dockerfile \ | ||
. |
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,6 +1,15 @@ | ||
{ | ||
"editor.formatOnSave": true, | ||
"editor.mouseWheelZoom": true, | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"prettier.prettierPath": "./node_modules/prettier", | ||
"i18n-ally.localesPaths": [ | ||
"projects/*/public/locales" | ||
"projects/fastgpt/public/locales" | ||
], | ||
"i18n-ally.keystyle": "nested" | ||
"i18n-ally.enabledParsers": ["json"], | ||
"i18n-ally.keystyle": "nested", | ||
"i18n-ally.sortKeys": true, | ||
"i18n-ally.keepFulfilled": true, | ||
"i18n-ally.sourceLanguage": "zh", // 根据此语言文件翻译其他语言文件的变量和内容 | ||
"i18n-ally.displayLanguage": "en", // 显示语言 | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,4 @@ | ||
# 首页路径 | ||
HOME_URL=/ | ||
SYSTEM_NAME=FAI | ||
SYSTEM_FAVICON=/favicon.ico |
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 @@ | ||
{ | ||
"extends": "next/core-web-vitals", | ||
"rules": { | ||
"react-hooks/rules-of-hooks": 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,32 @@ | ||
# dependencies | ||
node_modules/ | ||
# next.js | ||
.next/ | ||
out/ | ||
# production | ||
build/ | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.pnpm-debug.log* | ||
|
||
# local env files | ||
.env*.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts | ||
platform.json | ||
testApi/ | ||
local/ | ||
.husky/ | ||
data/*.local.* |
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,15 @@ | ||
//next-i18next.config.js | ||
/** | ||
* @type {import('next-i18next').UserConfig} | ||
*/ | ||
|
||
module.exports = { | ||
i18n: { | ||
defaultLocale: 'zh', | ||
locales: ['en', 'zh'], | ||
localeDetection: false | ||
}, | ||
localePath: | ||
typeof window === 'undefined' ? require('path').resolve('./public/locales') : '/public/locales', | ||
reloadOnPrerender: process.env.NODE_ENV === 'development' | ||
}; |
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,37 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const { i18n } = require('./next-i18next.config'); | ||
const path = require('path'); | ||
|
||
const nextConfig = { | ||
i18n, | ||
// output: 'standalone', | ||
reactStrictMode: process.env.NODE_ENV === 'development' ? false : true, | ||
compress: true, | ||
webpack(config, { isServer }) { | ||
if (!isServer) { | ||
config.resolve = { | ||
...config.resolve, | ||
fallback: { | ||
...config.resolve.fallback, | ||
fs: false | ||
} | ||
}; | ||
} | ||
config.module = { | ||
...config.module, | ||
rules: config.module.rules.concat([ | ||
{ | ||
test: /\.svg$/i, | ||
issuer: /\.[jt]sx?$/, | ||
use: ['@svgr/webpack'] | ||
} | ||
]), | ||
exprContextCritical: false, | ||
unknownContextCritical: false | ||
}; | ||
|
||
return config; | ||
} | ||
}; | ||
|
||
module.exports = nextConfig; |
Oops, something went wrong.