Skip to content

Commit

Permalink
🔨 Build frontend as part of CI
Browse files Browse the repository at this point in the history
  • Loading branch information
SilviaAmAm committed Jun 4, 2024
1 parent 26b60c4 commit dc1f938
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 28 deletions.
48 changes: 20 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,31 +73,24 @@ jobs:
working-directory: backend
files: ./coverage.xml

# frontend-build:
# name: Create 'production' build
# runs-on: ubuntu-latest
#
# defaults:
# run:
# working-directory: frontend
#
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v3
# with:
# node-version-file: 'frontend/.nvmrc'
#
# - name: Build Javascript
# run: |
# npm ci --legacy-peer-deps
# npm run build
#
# - name: Store build artifact
# uses: actions/upload-artifact@v3
# with:
# name: open-archiefbeheer-frontend-build
# path: dist/
# retention-days: 1
frontend-build:
name: Create 'production' build
runs-on: ubuntu-latest

defaults:
run:
working-directory: frontend

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: 'frontend/.nvmrc'

- name: Build Javascript
run: |
npm ci --legacy-peer-deps
npm run build
docs:
name: Build and check documentation
Expand Down Expand Up @@ -155,7 +148,7 @@ jobs:

- run: docker image save -o image.tar $IMAGE_NAME:${{ steps.vars.outputs.tag }}
- name: Store image artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: docker-image
path: image.tar
Expand All @@ -171,11 +164,10 @@ jobs:
if: github.event_name == 'push' # Exclude PRs

steps:
# This will include the updated OAS (if updated) from the update-oas job.
- uses: actions/checkout@v4

- name: Download built image
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: docker-image

Expand Down
1 change: 1 addition & 0 deletions frontend/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20

0 comments on commit dc1f938

Please sign in to comment.