Skip to content

Commit

Permalink
Kdav108/azure deployment (#170)
Browse files Browse the repository at this point in the history
* Add workflow to deploy to Azure Web App

* Test github action

* Test

* Fix workflow file'

* test 2

* Fix CI env varibale issue

* Fix bash command

* remove test step

* Add private key to workflow step

* Remove build step from server

* Try new secret name

* Add start and build script to root package.json

* Simplify Azure deploy workflow

* Cleanup azure deploy workflow

* Make azure deploy workflow run only on master branch

* Update azure deploy workflow

* Update deprecated github action versions

* Local message history (#164) (#171)

* Local message history

Implemented an MVP local overlay message history in camera system. Formatting should work fine on mobile. Limitations include losing everything when changing pages.

* Refactored code + added row borders

Refactored message history table component to be more inline with React standard, after reading more docs. Also added nicknames for V3 (Bilby),

* Added local storage

Now using localStorage so locally sent messages are kept in between sessions. Included footer button to delete messages

* Small efficiency gains + bug squashing

* Update .github/workflows/deploy_to_azure.yaml

---------

Co-authored-by: Mitchell De Nardis <[email protected]>
  • Loading branch information
kdav108 and BoneFiend authored Dec 3, 2023
1 parent 659c114 commit ab8115f
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 3 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/deploy_to_azure.yaml
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/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Build and deploy Node.js app to Azure Web App - DashMHP

on:
push:
branches:
- 'master'

jobs:
build:
runs-on: ubuntu-latest
environment:
name: 'production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- uses: actions/checkout@v3

# This is to allow github actions to clone our private common repository.
# The public key is with mhp-deployment github user
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

- name: Set up Node.js version
uses: actions/[email protected]
with:
node-version: '14.x'

- name: yarn install, build, and test front-end
# We use CI='' here because Github Action sets CI=true which makes warnings during
# install treated like errors
run: |
cd client
CI='' && yarn install
yarn run build
- name: yarn install, build, and test server
run: |
cd server
CI='' && yarn install
- name: 'Deploy to Azure Web App'
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'DashMHP'
slot-name: 'production'
publish-profile: ${{ secrets.AzureAppService_PublishProfile }}
package: .
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"scripts": {
"heroku-prebuild": "cd client && yarn install && yarn build && cd .. && cd server && yarn install",
"client-start": "cd client && yarn start",
"server-start": "cd server && yarn start"
"server-start": "cd server && yarn start",
"build": "cd client && yarn build",
"start": "cd server && yarn start"
},
"cacheDirectories": [
"client/node_modules",
Expand Down
4 changes: 2 additions & 2 deletions server/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1357,8 +1357,8 @@ methods@~1.1.2:
mustache "^4.2.0"

"mhp@ssh://[email protected]:monash-human-power/common.git":
version "1.2.0"
resolved "ssh://[email protected]:monash-human-power/common.git#4d92c39926898704b2ed244ba890f57bee1aa84e"
version "1.3.0"
resolved "ssh://[email protected]:monash-human-power/common.git#e630e4053a05a6c4690e68459a9679f45084009d"
dependencies:
js-yaml "^4.1.0"
mustache "^4.2.0"
Expand Down

0 comments on commit ab8115f

Please sign in to comment.