Skip to content

Add .nvmrc

Add .nvmrc #41

Workflow file for this run

name: Production
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: 14 # Current LTS
- name: Install dependencies
run: npm ci
- name: Create configs
run: cp .github/secrets/_config.prod.scss src/styles/_config.scss
- name: Save git hash
run: echo "export const release = '$GITHUB_SHA';" > src/release.ts
- name: Build in production mode
run: npm run build:prod
- name: Save maps
uses: actions/upload-artifact@v2
with:
name: maps
path: |
dist/mymicds-v2-angular/*.js
dist/mymicds-v2-angular/*.map
- name: Save production build
uses: actions/upload-artifact@v2
with:
name: build
path: |
dist/mymicds-v2-angular
!dist/mymicds-v2-angular/*.map
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
- name: Decrypt secret files
run: ./.github/scripts/decrypt_secrets.sh
env:
FILE_DECRYPT_KEY: ${{ secrets.FILE_DECRYPT_KEY }}
FILE_DECRYPT_IV: ${{ secrets.FILE_DECRYPT_IV }}
- name: Download build artifacts
uses: actions/download-artifact@v2
- name: Deploy to remote server
run: ./.github/scripts/deploy.sh
env:
IP: ${{ secrets.DEPLOY_SSH_IP }}
PORT: ${{ secrets.DEPLOY_SSH_PORT }}
- name: Create Sentry release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
with:
environment: production
sourcemaps: maps
url_prefix: https://mymicds.net/