Skip to content

Commit

Permalink
Merge pull request #16 from jvvillanueva9104/feature/pipeline1
Browse files Browse the repository at this point in the history
test25
  • Loading branch information
jvvillanueva9104 authored Aug 28, 2023
2 parents fc1ef76 + 2ff5922 commit 76b8ed1
Showing 1 changed file with 8 additions and 26 deletions.
34 changes: 8 additions & 26 deletions .github/workflows/m3pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code, run tests, and deploy to Azure Web Apps
# For more information, see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI
name: Node.js CI and Deployment

on:
push:
branches:
- "feature/*"
- "main"
- "develop"
pull_request:
branches:
- "develop"
- "main"
types:
- closed
workflow_dispatch:

jobs:
build_and_test:
Expand Down Expand Up @@ -72,26 +72,17 @@ jobs:
node-version: "18.x"

- name: Download artifact from build job
uses: actions/download-artifact@v3
uses: actions/download-artifact@v2
with:
name: node-app
path: |
dist/
src/
test/
mocharc.json
package-lock.json
package.json
tsconfig.json
.gitignore

- name: "Deploy to Azure Web App - Testing"
uses: azure/webapps-deploy@v2
id: deploy-to-webapp
with:
app-name: "turners-car-insurance-test-env"
slot-name: "testing"
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_936C3E3332AD406D90A7C20EFC2C8959 }}
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_936C3E3332AD406D90A7C20EFC2C8959 }}
package: .

deploy_to_production:
Expand All @@ -108,18 +99,9 @@ jobs:
node-version: "18.x"

- name: Download artifact from build job
uses: actions/download-artifact@v3
uses: actions/download-artifact@v2
with:
name: node-app
path: |
dist/
src/
test/
mocharc.json
package-lock.json
package.json
tsconfig.json
.gitignore

- name: "Deploy to Azure Web App - Production"
uses: azure/webapps-deploy@v2
Expand Down

0 comments on commit 76b8ed1

Please sign in to comment.