Chore/setup/draft/0 #277
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .................................... | |
# ... GITHUB ACIONS CI/CD WORKFLOW ... | |
# .................................... | |
name: Main (PR) Build CI | |
'on': | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
branches: | |
- main | |
- dev | |
push: | |
branches: | |
- dev | |
env: | |
DOCKER_IMAGE: 'scores_web' | |
jobs: | |
npm-build-check: | |
name: 🪀 NPM Build Check | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: dev | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16.17.0 | |
- name: '🏗️ Set npm version' | |
run: | | |
npm install -g npm@8.19.1 | |
- name: 'create .env' | |
run: | | |
echo ${{ secrets.ENV_FILE }} | base64 -d > .env | |
- name: '🟩 Build npm' | |
run: | | |
npm ci | |
npm install | |
npm run build | |
# docker-image-build: | |
# needs: npm-build-check | |
# name: 🐳 Docker Image Build | |
# runs-on: ubuntu-22.04 | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - name: Build docker image | |
# run: | | |
# docker build . --file ./docker/prod.Dockerfile --tag ${{ env.DOCKER_IMAGE }}:$(date +%s) |