Commit aa3db6ea authored by iquasere's avatar iquasere
Browse files

Added CI

for availability in server
parent 2dbfbe25
Pipeline #1645 failed
name: MOSGUITO release
on:
push:
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: Extract tag name
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Node.js Build ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- name: Create Release Folder and Zip
run: |
mv ./build ./mosguito-${{ steps.get_version.outputs.VERSION }}
zip -r mosguito-${{ steps.get_version.outputs.VERSION }}.zip ./mosguito-${{ steps.get_version.outputs.VERSION }}
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
mosguito-${{ steps.get_version.outputs.VERSION }}.zip
\ No newline at end of file
FROM node:13.12.0-alpine as build
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY package.*json ./
RUN npm install --silent
RUN npm install react-scripts@3.4.0 -g --silent
COPY . ./
RUN npm run build
FROM nginx:stable-alpine
COPY --from=build /app/build /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx","-g","daemon off;"]
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment