ci on Dockerfile

main
Cameron Clough 2022-01-11 01:17:45 +00:00
parent 1a17cc83d7
commit d23a263ab9
2 changed files with 7 additions and 10 deletions

View File

@ -6,14 +6,11 @@ on:
jobs:
build_test:
runs-on: ubuntu-latest
name: Build and test
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
check-latest: true
cache: 'npm'
- run: npm install
- run: npm run build
- run: npm test
- name: Build Docker image
run: docker build --target=builder -t retropilot-client:builder .
- name: Run tests
run: docker run --rm --env CI=true retropilot-client:builder npm test

View File

@ -15,7 +15,7 @@ ENV API_URL $API_URL
COPY . .
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 nginx.conf /etc/nginx/conf.d/default.conf