Rename static --> dist, build-production --> build, output .zip with subdir
This commit is contained in:
parent
967bf8f30a
commit
07726bf25c
9 changed files with 13 additions and 13 deletions
|
@ -12,8 +12,8 @@
|
||||||
yarn-error.log*
|
yarn-error.log*
|
||||||
/junit.xml
|
/junit.xml
|
||||||
|
|
||||||
|
/dist/
|
||||||
/static/
|
/static/
|
||||||
/static-test/
|
|
||||||
/public/
|
/public/
|
||||||
/dist/
|
/dist/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/node_modules/**
|
/node_modules/**
|
||||||
|
/dist/**
|
||||||
/static/**
|
/static/**
|
||||||
/static-test/**
|
|
||||||
/public/**
|
/public/**
|
||||||
/tmp/**
|
/tmp/**
|
||||||
/coverage/**
|
/coverage/**
|
||||||
|
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -11,8 +11,8 @@ yarn-error.log*
|
||||||
/junit.xml
|
/junit.xml
|
||||||
*.timestamp-*
|
*.timestamp-*
|
||||||
|
|
||||||
|
/dist/
|
||||||
/static/
|
/static/
|
||||||
/static-test/
|
|
||||||
/public/
|
/public/
|
||||||
/dist/
|
/dist/
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@ nginx-test:
|
||||||
changes:
|
changes:
|
||||||
- "installation/mastodon.conf"
|
- "installation/mastodon.conf"
|
||||||
|
|
||||||
build-production:
|
build:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- yarn build
|
- yarn build
|
||||||
|
@ -105,12 +105,12 @@ build-production:
|
||||||
# # Fail if files got changed.
|
# # Fail if files got changed.
|
||||||
# # https://stackoverflow.com/a/9066385
|
# # https://stackoverflow.com/a/9066385
|
||||||
# - git diff --quiet
|
# - git diff --quiet
|
||||||
- cp static/index.html static/404.html
|
- cp dist/index.html dist/404.html
|
||||||
variables:
|
variables:
|
||||||
NODE_ENV: production
|
NODE_ENV: production
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- static
|
- dist/
|
||||||
|
|
||||||
docs-deploy:
|
docs-deploy:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
|
@ -131,7 +131,7 @@ review:
|
||||||
name: review/$CI_COMMIT_REF_NAME
|
name: review/$CI_COMMIT_REF_NAME
|
||||||
url: https://$CI_COMMIT_REF_SLUG.git.soapbox.pub
|
url: https://$CI_COMMIT_REF_SLUG.git.soapbox.pub
|
||||||
script:
|
script:
|
||||||
- npx -y surge static $CI_COMMIT_REF_SLUG.git.soapbox.pub
|
- npx -y surge dist $CI_COMMIT_REF_SLUG.git.soapbox.pub
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
|
||||||
pages:
|
pages:
|
||||||
|
@ -139,7 +139,7 @@ pages:
|
||||||
before_script: []
|
before_script: []
|
||||||
script:
|
script:
|
||||||
# artifacts are kept between jobs
|
# artifacts are kept between jobs
|
||||||
- mv static public
|
- mv dist public
|
||||||
variables:
|
variables:
|
||||||
NODE_ENV: production
|
NODE_ENV: production
|
||||||
artifacts:
|
artifacts:
|
||||||
|
|
|
@ -14,4 +14,4 @@ ENV FALLBACK_PORT=4444
|
||||||
ENV BACKEND_URL=http://localhost:4444
|
ENV BACKEND_URL=http://localhost:4444
|
||||||
ENV CSP=
|
ENV CSP=
|
||||||
COPY installation/docker.conf.template /etc/nginx/templates/default.conf.template
|
COPY installation/docker.conf.template /etc/nginx/templates/default.conf.template
|
||||||
COPY --from=build /app/static /usr/share/nginx/html
|
COPY --from=build /app/dist /usr/share/nginx/html
|
||||||
|
|
|
@ -38,7 +38,7 @@ export default () => ({
|
||||||
NODE_ENV: NODE_ENV || 'development',
|
NODE_ENV: NODE_ENV || 'development',
|
||||||
BACKEND_URL: sanitizeURL(BACKEND_URL),
|
BACKEND_URL: sanitizeURL(BACKEND_URL),
|
||||||
FE_SUBDIRECTORY: sanitizeBasename(FE_SUBDIRECTORY),
|
FE_SUBDIRECTORY: sanitizeBasename(FE_SUBDIRECTORY),
|
||||||
FE_BUILD_DIR: sanitizePath(FE_BUILD_DIR) || 'static',
|
FE_BUILD_DIR: sanitizePath(FE_BUILD_DIR) || 'dist',
|
||||||
FE_INSTANCE_SOURCE_DIR: FE_INSTANCE_SOURCE_DIR || 'instance',
|
FE_INSTANCE_SOURCE_DIR: FE_INSTANCE_SOURCE_DIR || 'instance',
|
||||||
SENTRY_DSN,
|
SENTRY_DSN,
|
||||||
},
|
},
|
||||||
|
|
|
@ -155,7 +155,7 @@ Options:
|
||||||
|
|
||||||
- Any directory name, eg `"public"`
|
- Any directory name, eg `"public"`
|
||||||
|
|
||||||
Default: `"static"`
|
Default: `"dist"`
|
||||||
|
|
||||||
### `FE_SUBDIRECTORY`
|
### `FE_SUBDIRECTORY`
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ NODE_ENV=development
|
||||||
- `yarn dev` - Run the local dev server.
|
- `yarn dev` - Run the local dev server.
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
- `yarn build` - Compile without a dev server, into `/static` directory.
|
- `yarn build` - Compile without a dev server, into `/dist` directory.
|
||||||
|
|
||||||
## Translations
|
## Translations
|
||||||
- `yarn i18n` - Rebuilds app and updates English locale to prepare for translations in other languages. Should always be run after editing i18n strings.
|
- `yarn i18n` - Rebuilds app and updates English locale to prepare for translations in other languages. Should always be run after editing i18n strings.
|
||||||
|
|
|
@ -14,7 +14,7 @@ export default defineConfig({
|
||||||
root: 'app',
|
root: 'app',
|
||||||
build: {
|
build: {
|
||||||
// Relative to the root
|
// Relative to the root
|
||||||
outDir: '../static',
|
outDir: '../dist',
|
||||||
assetsDir: 'packs',
|
assetsDir: 'packs',
|
||||||
assetsInlineLimit: 0,
|
assetsInlineLimit: 0,
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
|
|
Loading…
Reference in a new issue