Skip to content

Commit

Permalink
Create azuer.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
newsproutsmedia authored Jan 27, 2021
1 parent 8b28876 commit 187fb1c
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/azure.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Build and deploy Node.js project to Azure Function App - newsproutschatapp

on:
push:
branches:
- master
workflow_dispatch:

env:
AZURE_FUNCTIONAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root
NODE_VERSION: '12.x' # set this to the node version to use (supports 8.x, 10.x, 12.x)
APP_NAME: 'ChatApp'
EMAIL: '[email protected]'
TEST_EMAIL: '[email protected]'
REFRESH_TOKEN: '1//04Hh7Pmxd_rS6CgYIARAAGAQSNwF-L9IrGcs9G2jno4YOt0VHnvt3ljpGCsPUg0t5dwacRllx-Tn9m3Q8f7BYrR5eCk-q0j_3cQ4'
CLIENT_SECRET: 'axyZlbcEuKJXywREDyGaUpqS'
CLIENT_ID: '32845731290-nnf2al9hbh1p13od2iqfktdpdm7e3usp.apps.googleusercontent.com'
SCHEME: 'http'
DOMAIN: 'chatapp.newsproutsmedia.com'

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@master

- name: 'Setup Node Environment'
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}

- name: 'Resolve Project Dependencies Using Npm'
shell: bash
run: |
pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}'
npm install
npm run build --if-present
npm run test --if-present
popd

- name: 'Run Azure Functions Action'
uses: Azure/functions-action@v1
id: fa
with:
app-name: 'newsproutschatapp'
slot-name: 'production'
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
publish-profile: ${{ secrets.AzureAppService_PublishProfile_2daa4849ae3e45cfa62b4be3fd319547 }}

0 comments on commit 187fb1c

Please sign in to comment.