/main_mern-webapp.yml Secret
Created
December 10, 2021 16:42
Modified Github/Azure Node app Yaml
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
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy | |
# More GitHub Actions for Azure: https://github.com/Azure/actions | |
name: Build and deploy Node.js app to Azure Web App - mern-webapp | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
env: | |
AZURE_WEBAPP_NAME: mern-webapp # set this to your application's name | |
AZURE_WEBAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root | |
NODE_VERSION: '14.x' | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Node.js version ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: npm install, build | |
run: | | |
npm install | |
npm run build | |
#npm install nodemon | |
- name: 'Deploy to Azure Web App' | |
uses: azure/webapps-deploy@v2 | |
id: deploy-to-webapp | |
with: | |
app-name: ${{ env.AZURE_WEBAPP_NAME }} | |
slot-name: 'Production' | |
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_D14EDB11DE9149A8826F2ADD8F1C22BC }} | |
package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment