Skip to content

Merge pull request #26 from nguyenvanhuan243/add-model-deposit-usdt #161

Merge pull request #26 from nguyenvanhuan243/add-model-deposit-usdt

Merge pull request #26 from nguyenvanhuan243/add-model-deposit-usdt #161

name: Github Action For Frontend
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build_and_deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./
strategy:
matrix:
node-version:
- 14.x
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: ${{ github.workspace }}/package-lock.json
- run: npm install
- name: Build Docker Image
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
run: |
docker build \
-t remi_frontend \
.
docker tag remi_frontend:latest nguyenvanhuan243/remi_frontend:latest
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push Docker Image
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
docker push nguyenvanhuan243/remi_frontend:latest
- name: Deploy to Render Server (Master)
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
curl -X GET https://api.render.com/deploy/srv-cod15da0si5c738nra3g?key=eGtlwOezsDI