10
.github/workflows/deploy.yaml
vendored
10
.github/workflows/deploy.yaml
vendored
@@ -11,7 +11,11 @@ jobs:
|
||||
build:
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- name: Deploy
|
||||
- uses: actions/checkout@v3
|
||||
- name: Build image
|
||||
run: docker build -t ${{ github.repository }} .
|
||||
- name: Deploy image
|
||||
run: |
|
||||
npm install
|
||||
npm run build
|
||||
docker stop ${{ github.event.repository.name }} || true
|
||||
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
|
||||
WORKDIR /app
|
||||
COPY ./ ./
|
||||
RUN npm install
|
||||
CMD ["npm", "run", "build"]
|
||||
CMD ["npm","install"]
|
||||
CMD ["npx","next","build"]
|
||||
CMD ["npx","next","start"]
|
||||
|
||||
Reference in New Issue
Block a user