Skip to content

collapsible trade/single form (#134) #230

collapsible trade/single form (#134)

collapsible trade/single form (#134) #230

Workflow file for this run

name: Build & Deploy
on:
push:
branches:
- main
- development
pull_request:
branches:
- main
- development
jobs:
build:
name: Build - Lint & Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- run: yarn install
- run: yarn check
- run: yarn lint
- run: npx playwright install
- run: yarn test
- run: yarn build
nexus:
if: github.event_name == 'push'
name: Publish - Nexus Hub
needs: [build]
runs-on: ubuntu-latest
environment:
name: ${{ github.ref == 'refs/heads/main' && 'production' || 'development' }}
env:
USERNAME: ${{ secrets.NEXUS_USER }}
PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
REPO_URL: ${{ secrets.NEXUS_REPO_URL }}
STAGE: ${{ github.ref == 'refs/heads/main' && 'production' || 'development' }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Get package.json version
run: echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
- name: Set up Docker
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ env.USERNAME }}
password: ${{ env.PASSWORD }}
registry: ${{ env.REPO_URL }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
file: ./docker/${{ env.STAGE }}/Dockerfile
push: true
tags: |
${{ env.REPO_URL }}/edpn/frontend/${{ env.STAGE }}/edpn-frontend:${{ env.PACKAGE_VERSION }}
${{ env.REPO_URL }}/edpn/frontend/${{ env.STAGE }}/edpn-frontend:latest