-
-
Notifications
You must be signed in to change notification settings - Fork 14
Fredrick/issue 314/git action integration #346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 9 commits
5b5ffd8
7dcac5e
1f0a03c
89f1215
0bcef7c
7ad22c5
e8d491c
9c17a85
1111eb2
573edbc
d0e35cc
e09ab9b
24dcca2
6a7e8c7
961765b
40b0436
6a22b8c
3daccc6
a545357
da401ff
0810ad2
ce0ab0f
8f1a102
65c3eff
674f55d
f5bcae8
976b18c
bf2b1c0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # This is a basic workflow to help deploy the backend code to Azure server | ||
| # it triggers on push and pull request events to the master branch | ||
| # it runs the jobs on the API/ directory and deploys using secret credentials | ||
| # Update the secret credentials with details from the Azure web server. | ||
|
|
||
| name: "CI/CD Pipeline for Azure webapp deployment" | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| pull_request: | ||
| types: [opened, synchronize, reopened, closed] | ||
| branches: | ||
| - master | ||
| jobs: | ||
| build_and_deploy: | ||
| name: Build test and Deploy Node App to Azure | ||
| runs-on: ubuntu-latest | ||
| if: >- | ||
| github.event_name == 'push' || (github.event_name == 'pull_request' && | ||
| github.event.action != 'closed') | ||
| environment: production | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - name: Use Node.js | ||
| uses: actions/setup-node@v1 | ||
| with: | ||
| node-version: "14.x" | ||
| - name: npm install, build, and test | ||
| run: | | ||
| pwd | ||
| ls | ||
| cd API/ | ||
| npm install | ||
| npm run build --if-present | ||
| npm run test --if-present | ||
| echo Successful | ||
| - name: "Deploy to Azure" | ||
| uses: azure/webapps-deploy@v2 | ||
| with: | ||
| app-name: ${{ secrets.AZURE_WEBAPP_NAME }} | ||
| publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} | ||
| package: ${{ secrets.AZURE_WEBAPP_PACKAGE_PATH }} | ||
| - if: github.ref == 'refs/heads/master' && job.status == 'success' | ||
| run: | | ||
| git push -u origin HEAD:master -f | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is interesting. it deploys in the previous step, and if successful auto-merges the code. but i don't think I like that approach. I'd rather |
||
Uh oh!
There was an error while loading. Please reload this page.