-
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.
Merge pull request #62 from explooosion/develop
Merge develop into master
- Loading branch information
Showing
113 changed files
with
24,922 additions
and
16,926 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 @@ | ||
last 10 Chrome versions |
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,36 +1,36 @@ | ||
# 網站網址, 用於導向網址 | ||
REACT_APP_WEB_URL_DEV='http://localhost:3000/#/' | ||
REACT_APP_WEB_URL='https://browndust.info/#/' | ||
VITE_WEB_URL_DEV='http://localhost:5173/#/' | ||
VITE_WEB_URL='https://browndust.info/#/' | ||
|
||
# 網站描述, 用於設定 icon 等檔案路徑 | ||
REACT_APP_META_URL='https://browndust.info' | ||
VITE_META_URL='https://browndust.info' | ||
|
||
# API 網址, 當官方網站離線時, 就會改讀取 github 的 | ||
REACT_APP_API_URL_DEV='https://raw.githubusercontent.com/explooosion/browndust-share/master/pre-work/getAll.json' | ||
REACT_APP_API_URL_GLOBAL_DEV='https://raw.githubusercontent.com/explooosion/browndust-share/master/pre-work/global/getAll.json' | ||
VITE_API_URL_DEV='https://raw.githubusercontent.com/explooosion/browndust-share/master/pre-work/getAll.json' | ||
VITE_API_URL_GLOBAL_DEV='https://raw.githubusercontent.com/explooosion/browndust-share/master/pre-work/global/getAll.json' | ||
|
||
# api worker | ||
REACT_APP_API_URL='https://api.browndust.info' | ||
VITE_API_URL='https://api.browndust.info' | ||
# 原站, 改使用 cloudflare worker | ||
# REACT_APP_API_URL='https://browndust-api.pmang.cloud/book/getAllCharacters' | ||
# REACT_APP_API_URL='https://browndust-api.pmang.cloud/v1/book/character/getAll' | ||
# VITE_API_URL='https://browndust-api.pmang.cloud/book/getAllCharacters' | ||
# VITE_API_URL='https://browndust-api.pmang.cloud/v1/book/character/getAll' | ||
|
||
# global api worker | ||
# 原站, 改使用 cloudflare worker | ||
REACT_APP_API_URL_GLOBAL='https://global-api.browndust.info' | ||
# REACT_APP_API_URL_GLOBAL='https://browndust-global-api.pmang.cloud/book/getAllCharacters' | ||
# REACT_APP_API_URL_GLOBAL='https://browndust-global-api.pmang.cloud/v1/book/character/getAll' | ||
VITE_API_URL_GLOBAL='https://global-api.browndust.info' | ||
# VITE_API_URL_GLOBAL='https://browndust-global-api.pmang.cloud/book/getAllCharacters' | ||
# VITE_API_URL_GLOBAL='https://browndust-global-api.pmang.cloud/v1/book/character/getAll' | ||
|
||
# 圖片資源網址 | ||
REACT_APP_RESOURCE_URL_DEV='/resource' | ||
REACT_APP_RESOURCE_URL='https://browndust.info/resource' | ||
VITE_RESOURCE_URL_DEV='/resource' | ||
VITE_RESOURCE_URL='https://browndust.info/resource' | ||
|
||
# 圖示資源網址 | ||
REACT_APP_THUMBNAIL_URL_ORIGIN='https://ic-common.pmang.cloud/static/bdt_book' | ||
REACT_APP_ICON_URL_ORIGIN='https://book.browndust.app/src/img' | ||
VITE_THUMBNAIL_URL_ORIGIN='https://ic-common.pmang.cloud/static/bdt_book' | ||
VITE_ICON_URL_ORIGIN='https://book.browndust.app/src/img' | ||
|
||
# 官方網站連結 | ||
REACT_APP_BOOK_DEV='https://book.browndust.app' | ||
REACT_APP_BOOK='https://book.browndust.app' | ||
VITE_BOOK_DEV='https://book.browndust.app' | ||
VITE_BOOK='https://book.browndust.app' | ||
|
||
GENERATE_SOURCEMAP=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 |
---|---|---|
|
@@ -2,4 +2,4 @@ docs | |
pre-work | ||
public | ||
screenshots | ||
wireframe | ||
dist |
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,38 @@ | ||
{ | ||
"root": true, | ||
"env": { | ||
"browser": true, | ||
"es2020": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:react/jsx-runtime", | ||
"plugin:react-hooks/recommended" | ||
], | ||
"ignorePatterns": [ | ||
".eslintrc.json" | ||
], | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"settings": { | ||
"react": { | ||
"version": "18.2" | ||
} | ||
}, | ||
"plugins": [ | ||
"react-refresh" | ||
], | ||
"rules": { | ||
"react/jsx-no-target-blank": "off", | ||
"react-hooks/exhaustive-deps": "off", | ||
"react-refresh/only-export-components": [ | ||
"warn", | ||
{ | ||
"allowConstantExport": 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 |
---|---|---|
@@ -1,29 +1,55 @@ | ||
name: Build Website | ||
name: Deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Master | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node Version | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
|
||
- name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built. | ||
run: | | ||
cp .env.example .env | ||
yarn install --ignore-engines | ||
yarn build | ||
- name: Deploy 🚀 | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
token: ${{ secrets.ACCESS_TOKEN }} | ||
folder: build # The folder the action should deploy. | ||
branch: gh-pages | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "22" | ||
|
||
- name: Install dependencies | ||
uses: bahmutov/npm-install@v1 | ||
|
||
- name: Set up environment variables | ||
run: | | ||
cp .env.example .env | ||
- name: Build project | ||
run: npm run build | ||
|
||
- name: Upload production-ready build files | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: production-files | ||
path: ./dist | ||
|
||
deploy: | ||
name: Deploy | ||
needs: build | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/master' | ||
|
||
steps: | ||
- name: Download artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: production-files | ||
path: ./dist | ||
|
||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./dist |
Oops, something went wrong.