mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-07-19 21:29:41 +02:00
fixes
This commit is contained in:
parent
a180f6c649
commit
eea82fee8f
2 changed files with 5 additions and 2 deletions
1
.github/workflows/build.yml
vendored
1
.github/workflows/build.yml
vendored
|
@ -10,7 +10,6 @@ on:
|
||||||
env:
|
env:
|
||||||
REGISTRY: ghcr.io
|
REGISTRY: ghcr.io
|
||||||
IMAGE_NAME: ${{ github.repository }}
|
IMAGE_NAME: ${{ github.repository }}
|
||||||
IMAGE_NAME_TEST: ${{ fromJSON('[${{github.repository}}, ${{github.repository}}-stage]')[endsWith(github.ref, '/stage')] }}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
|
@ -34,6 +34,7 @@ function createApp(): express.Express {
|
||||||
*/
|
*/
|
||||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||||
|
const cwd = process.cwd();
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
const localConfig = appConfig.frontend;
|
const localConfig = appConfig.frontend;
|
||||||
|
@ -85,7 +86,10 @@ function createApp(): express.Express {
|
||||||
app.use(express.static(path.join(__dirname, '../../public')));
|
app.use(express.static(path.join(__dirname, '../../public')));
|
||||||
|
|
||||||
if (appConfig.uploads.driver === 'local') {
|
if (appConfig.uploads.driver === 'local') {
|
||||||
app.use('/uploads', express.static(appConfig.uploads.local.path));
|
const uploadsPath = path.join(cwd, appConfig.uploads.local.path);
|
||||||
|
|
||||||
|
console.log(uploadsPath);
|
||||||
|
app.use('/uploads', express.static(uploadsPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
app.use('/favicon', express.static(downloadedFaviconFolder));
|
app.use('/favicon', express.static(downloadedFaviconFolder));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue