forked from labring/fastgpt-home
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Carson Yang <[email protected]>
- Loading branch information
1 parent
54c1857
commit c4e6eed
Showing
171 changed files
with
11,754 additions
and
13,488 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,28 @@ | ||
name: github pages | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
paths: | ||
- 'projects/fastgpt/**' | ||
branches: | ||
- 'main' | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build | ||
run: | | ||
cd projects/fastgpt | ||
npm install | ||
npm run build | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GH_PAT }} | ||
publish_dir: ./projects/fastgpt/out |
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,49 +1,67 @@ | ||
name: Build fastgpt page images in Personal warehouse | ||
name: Build FastGPT landing page image | ||
on: | ||
workflow_dispatch: | ||
push: | ||
paths: | ||
- 'projects/fastgpt/**' | ||
branches: | ||
- 'main' | ||
- 'main | ||
jobs: | ||
build-fastgpt-images: | ||
runs-on: ubuntu-20.04 | ||
build-fastgpt-landingpage-images: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- name: Get current date and time | ||
id: datetime | ||
run: echo "datetime=$(date +'%Y%m%d%H%M%S')" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
fetch-depth: 0 | ||
# list of Docker images to use as base name for tags | ||
images: | | ||
${{ secrets.DOCKER_HUB_NAME }}/fastgpt-home | ||
ghcr.io/${{ github.repository_owner }}/fastgpt-home | ||
registry.cn-hangzhou.aliyuncs.com/${{ secrets.ALI_HUB_USERNAME }}/fastgpt-home | ||
tags: | | ||
${{ steps.datetime.outputs.datetime }} | ||
flavor: latest=false | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
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 | ||
username: ${{ secrets.DOCKER_HUB_NAME }} | ||
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | ||
|
||
- name: Login to ghcr.io | ||
uses: docker/login-action@v3 | ||
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:latest" >> $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/fastgpt && 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 \ | ||
. | ||
|
||
- name: Login to Aliyun | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: registry.cn-hangzhou.aliyuncs.com | ||
username: ${{ secrets.ALI_HUB_USERNAME }} | ||
password: ${{ secrets.ALI_HUB_PASSWORD }} | ||
|
||
- name: Build and push Docker images to ghcr.io and DockerHub | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: projects/fastgpt | ||
file: projects/fastgpt/Dockerfile | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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,12 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = crlf | ||
charset = utf-8 | ||
trim_trailing_whitespace = false | ||
insert_final_newline = false |
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 @@ | ||
SITE_URL= | ||
|
||
NEXT_PUBLIC_BAIDU_TONGJI= | ||
NEXT_PUBLIC_GOOGLE_ID= |
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 |
---|---|---|
@@ -1,6 +1,3 @@ | ||
{ | ||
"extends": "next/core-web-vitals", | ||
"rules": { | ||
"react-hooks/rules-of-hooks": 0 | ||
} | ||
"extends": "next/core-web-vitals" | ||
} |
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,32 +1,130 @@ | ||
# dependencies | ||
node_modules/ | ||
# next.js | ||
.next/ | ||
out/ | ||
# production | ||
build/ | ||
|
||
# misc | ||
### Node template | ||
.idea | ||
.DS_Store | ||
*.pem | ||
dist | ||
|
||
# debug | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.pnpm-debug.log* | ||
lerna-debug.log* | ||
.temp | ||
yarn.lock | ||
|
||
# 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 | ||
|
||
# local env files | ||
.env*.local | ||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# vercel | ||
.vercel | ||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# typescript | ||
# 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 | ||
next-env.d.ts | ||
platform.json | ||
testApi/ | ||
local/ | ||
.husky/ | ||
data/*.local.* | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# 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 variables file | ||
.env | ||
.env.test | ||
.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 assets line in if your project uses Gatsby and not Next.js | ||
# https://nextjs.org/blog/next-9-1#public-directory-support | ||
# assets | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# 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.* | ||
|
||
/.vuepress/dist/ | ||
|
||
# sitemap | ||
*/sitemap*.xml | ||
*/robots.txt |
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 @@ | ||
# if use pnpm | ||
enable-pre-post-scripts=true |
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,18 @@ | ||
{ | ||
"css.validate": false, | ||
"editor.formatOnSave": true, | ||
"editor.tabSize": 2, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit", | ||
"source.organizeImports": "explicit" | ||
}, | ||
"headwind.runOnSave": false, | ||
"typescript.preferences.importModuleSpecifier": "non-relative", | ||
"eslint.validate": ["javascript", "javascriptreact", "typescript"], | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"commentTranslate.source": "Bing", | ||
"cSpell.words": [ | ||
"contentlayer", | ||
"lemonsqueezy" | ||
] | ||
} |
Oops, something went wrong.