Skip to content

Change tests to use node 14 #31

Change tests to use node 14

Change tests to use node 14 #31

name: Deploy production from main
on:
push:
branches: [main]
workflow_dispatch:
env:
NODE_VERSION: "16.x"
concurrency: production-environment
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 14.x
- uses: c-hive/gha-yarn-cache@v1
- run: yarn install --silent
- run: yarn test
build-and-deploy:
name: Build and deploy
runs-on: ubuntu-latest
needs: test
environment: production
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: yarn build
env:
# The license needs to present when building, so that the admin-ui is built as enterprise version
STRAPI_LICENSE: ${{ secrets.STRAPI_LICENSE }}
run: |
yarn install --silent
yarn build
- name: Deploy to Azure webApp
uses: azure/webapps-deploy@v2
with:
app-name: pof-backend-production
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}