10
.github/workflows/deploy.yaml
vendored
10
.github/workflows/deploy.yaml
vendored
@@ -11,7 +11,11 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
steps:
|
steps:
|
||||||
- name: Deploy
|
- uses: actions/checkout@v3
|
||||||
|
- name: Build image
|
||||||
|
run: docker build -t ${{ github.repository }} .
|
||||||
|
- name: Deploy image
|
||||||
run: |
|
run: |
|
||||||
npm install
|
docker stop ${{ github.event.repository.name }} || true
|
||||||
npm run build
|
docker rm ${{ github.event.repository.name }} || true
|
||||||
|
docker run -d -e ${{ github.repository }} -p 3000:3000
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
FROM node:16.10.0
|
FROM node:16.10.0
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY ./ ./
|
COPY ./ ./
|
||||||
RUN npm install
|
CMD ["npm","install"]
|
||||||
CMD ["npm", "run", "build"]
|
CMD ["npx","next","build"]
|
||||||
|
CMD ["npx","next","start"]
|
||||||
|
|||||||
Reference in New Issue
Block a user