Skip to content

Merge pull request #212 from palladiumkenya/MaryKilewe-patch-8 #27

Merge pull request #212 from palladiumkenya/MaryKilewe-patch-8

Merge pull request #212 from palladiumkenya/MaryKilewe-patch-8 #27

name: deploy to qa
on:
push:
branches:
- dev # Change this to your main branch name if different
pull_request:
branches:
- dev # Change this to your main branch name if different
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up .NET Core SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: '2.1.x' # Change this to the .NET Core SDK version you're using
- name: Install Node.js and npm
uses: actions/setup-node@v2
with:
node-version: '14.17.6'
- name: Install dependencies
run: npm install
working-directory: src/Dwapi
- name: Build the ASP.NET app
run: dotnet build src/Dwapi/Dwapi.csproj --configuration Release
- name: Build the angular UI
run: npm run build
working-directory: src/Dwapi
- name: Publish the ASP.NET app
run: dotnet publish src/Dwapi/Dwapi.csproj -c Release -o ./publish
- name: Build Docker image
run: docker build -t kenyahmis/dwapi:qa .
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERUSERNAME }}
password: ${{ secrets.DOCKERPASSWORD }}
- name: Push Docker image
run: docker push kenyahmis/dwapi:qa