ci on Dockerfile
parent
1a17cc83d7
commit
d23a263ab9
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue