feat: update to 1.1.0 #22
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
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Minimize and Dockerize | |
on: | |
push: | |
branches: | |
- master | |
env: | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x] | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- run: npm ci --force | |
- run: npx prisma generate | |
- run: npm run buildcjs | |
- run: npm i [email protected] -g | |
#Minify website js | |
- run: mkdir ./website/js/output/ | |
- run: minify ./website/js/graphQl.js > ./website/js/output/graphQl.js | |
- run: minify ./website/js/search.js > ./website/js/output/search.js | |
- run: minify ./website/js/sharedGraphQL.js > ./website/js/output/sharedGraphQL.js | |
- run: minify ./website/js/tableCreator.js > ./website/js/output/tableCreator.js | |
- run: minify ./website/js/utilities.js > ./website/js/output/utilities.js | |
- run: minify ./website/js/vdm.js > ./website/js/output/vdm.js | |
- run: mv ./website/js/output/* ./website/js/ | |
#Publish to docker | |
- run: docker login -u thebv -p "$DOCKER_PASSWORD" | |
- run: docker build -t thebv/demoticks-node-app . | |
- run: docker push thebv/demoticks-node-app:latest |