diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml new file mode 100644 index 00000000..ddce86f4 --- /dev/null +++ b/.github/workflows/CD.yml @@ -0,0 +1,26 @@ +name: CD + +on: + push: + branches: [ "develop" ] + +env: + HOST: ${{ secrets.HOST }} + USERNAME: ${{ secrets.USERNAME }} + KEY: ${{ secrets.SSH_KEY }} + +jobs: + deploy-ci: + runs-on: ubuntu-22.04 + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Build and push Docker image + uses: docker/build-push-action@v2 + with: + context: . + file: ./deploy/Dockerfile + push: true + tags: lequu/lequu-client:latest diff --git a/deploy/Dockerfile b/deploy/Dockerfile new file mode 100644 index 00000000..13c28c9f --- /dev/null +++ b/deploy/Dockerfile @@ -0,0 +1,15 @@ +FROM node:18.17.0-slim + +WORKDIR /app + +RUN npm install -g serve + +COPY package*.json . + +RUN npm install --legacy-peer-deps + +COPY . . + +RUN npm run build + +CMD ["serve", "-s", "build"]