ci on Dockerfile
parent
1a17cc83d7
commit
d23a263ab9
|
@ -6,14 +6,11 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_test:
|
build_test:
|
||||||
runs-on: ubuntu-latest
|
name: Build and test
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-node@v2
|
- name: Build Docker image
|
||||||
with:
|
run: docker build --target=builder -t retropilot-client:builder .
|
||||||
node-version: '16'
|
- name: Run tests
|
||||||
check-latest: true
|
run: docker run --rm --env CI=true retropilot-client:builder npm test
|
||||||
cache: 'npm'
|
|
||||||
- run: npm install
|
|
||||||
- run: npm run build
|
|
||||||
- run: npm test
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ ENV API_URL $API_URL
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM nginx:1.20-alpine AS server
|
FROM nginx:1.20-alpine
|
||||||
|
|
||||||
COPY --from=builder /app/build /usr/share/nginx/html
|
COPY --from=builder /app/build /usr/share/nginx/html
|
||||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
Loading…
Reference in New Issue