Merge pull request #6 from gractwo/millennium

Workflows
This commit is contained in:
Stanisław Dzioba
2022-12-16 21:55:26 +01:00
committed by GitHub
2 changed files with 25 additions and 0 deletions

20
.github/deploy.yml vendored Normal file
View File

@@ -0,0 +1,20 @@
name: Deploy
on:
push:
branches: ['master']
pull_request:
branches: ['master']
jobs:
build:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- name: Build image
run: docker build -t ${{ github.repository }} .
- name: Deploy image
run: |
docker stop ${{ github.event.repository.name }} || true
docker rm ${{ github.event.repository.name }} || true
docker run -d -e "TOKEN=${{ secrets.TOKEN }}" --restart always -p 2020:2020 --name ${{ github.event.repository.name }} ${{ github.repository }}

5
Dockerfile Normal file
View File

@@ -0,0 +1,5 @@
FROM node:latest
WORKDIR /app
COPY ./ ./
RUN npm install
CMD ["npm", "run", "start"]