Skip to content

Commit

Permalink
Merge pull request #7027 from Ocelot-Social-Community/update-frontend…
Browse files Browse the repository at this point in the history
…-boilerplate-26-02

chore(frontend): update frontend boilerplate 26 02
  • Loading branch information
ulfgebhardt authored Feb 26, 2024
2 parents 4c9f87f + 2069fff commit 07ae5c0
Show file tree
Hide file tree
Showing 6 changed files with 16,029 additions and 20,656 deletions.
3 changes: 3 additions & 0 deletions .github/file-filters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ frontend-test-unit-code: &frontend-test-unit-code
frontend-test-build-code: &frontend-test-build-code
- 'frontend/**/*'

frontend-test-build-docker: &frontend-test-build-docker
- 'frontend/**/*'

frontend-test-build-docs: &frontend-test-build-docs
- 'frontend/**/*.md'
- 'frontend/.vuepress/*'
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/frontend.test.build.docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "frontend:test:build test docker"

on: push

jobs:
# only (but most important) job from this workflow required for pull requests
# check results serve as run conditions for all other jobs here
files-changed:
name: Detect File Changes - frontend-test-build-docker
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.changes.outputs.frontend-test-build-docker }}
steps:
- uses: actions/checkout@v4

- name: Check for frontend file changes
uses: dorny/[email protected]
id: changes
with:
token: ${{ github.token }}
filters: .github/file-filters.yml
list-files: shell

build-production:
if: needs.files-changed.outputs.changes == 'true'
name: Build Docker Production - Frontend
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./frontend
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Frontend | Build Docker Production
run: docker compose -f docker-compose.yml build
working-directory: ${{env.WORKING_DIRECTORY}}

build-development:
if: needs.files-changed.outputs.changes == 'true'
name: Build Docker Development - Frontend
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./frontend
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Frontend | Build Docker Development
run: docker compose build
working-directory: ${{env.WORKING_DIRECTORY}}
4 changes: 4 additions & 0 deletions frontend/.vuepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { defaultTheme } from '@vuepress/theme-default'
import { viteBundler } from '@vuepress/bundler-vite'
import { defineUserConfig } from 'vuepress'

export default defineUserConfig({
Expand All @@ -6,4 +8,6 @@ export default defineUserConfig({
dest: 'build/docs',
base: process.env.VUEPRESS_BASE ? `/${process.env.VUEPRESS_BASE}/` : '/',
pagePatterns: ['**/*.md', '**/LICENSE', '!.vuepress', '!node_modules'],
bundler: viteBundler({}),
theme: defaultTheme({}),
})
2 changes: 1 addition & 1 deletion frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ FROM base as build
# Copy everything
COPY . .
# npm install
RUN npm install --frozen-lockfile --non-interactive
RUN npm install --include=dev --frozen-lockfile --non-interactive
# npm build
RUN npm run build

Expand Down
Loading

0 comments on commit 07ae5c0

Please sign in to comment.