Created
September 3, 2021 18:47
-
-
Save italopinto/0808e4433f7c4c0ee18803d09f9767ff to your computer and use it in GitHub Desktop.
Github action based on the examples from https://github.com/marketplace/actions/azure-webapp
This file contains hidden or 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
name: Deploy Node.js to Azure Web App | |
on: push | |
env: | |
AZURE_WEBAPP_NAME: node-app # set this to your application's name | |
AZURE_WEBAPP_PACKAGE_PATH: "src/" # set this to the path to your web app project, defaults to the repository root | |
NODE_VERSION: "14.17.3" # node latest LTS version | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
# checkout the repo | |
- name: "Checkout Github Action" | |
uses: actions/checkout@master | |
- name: Use Node.js ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: "npm install" | |
run: | | |
npm install | |
- name: "Run Azure webapp deploy action using publish profile credentials" | |
uses: azure/webapps-deploy@v2 | |
with: | |
app-name: ${{ env.AZURE_WEBAPP_NAME }} | |
publish-profile: ${{ secrets.azureWebAppPublishProfile }} | |
package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment