Frontend Feat: Password change from user settings. #28
This file contains 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
# The name of the workflow. | |
name: Build and Deploy | |
# Run the workflow when code is pushed to the main branch | |
on: | |
push: | |
branches: | |
- main | |
# This is the workflow that is being run. | |
jobs: | |
build-and-deploy: | |
# This is telling GitHub to run the workflow on the latest version of Ubuntu. | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the code from the GitHub repository | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
# Install dependencies, export environment variables to be used by application and run tests for the server application | |
- name: Install and Test Server | |
working-directory: ./server | |
env: # Define environment variables for this step | |
MONGO_URI: ${{ secrets.MONGO_URI }} | |
MONGO_URI_TEST: ${{ secrets.MONGO_URI_TEST }} | |
JWT_SECRET: ${{ secrets.JWT_SECRET }} | |
run: | | |
npm install | |
npm run test | |
# Build a Docker image for the client application | |
- name: Build Client Docker Image | |
working-directory: ./client | |
# Build image with tag rakeshpotnuru/productivity-app:client | |
run: | | |
docker build -t chrisantiago217/opendoors:client-${{github.run_number}} -t chrisantiago217/opendoors:client-latest . | |
# Build a Docker image for the server application | |
- name: Build Server Docker Image | |
working-directory: | |
./server | |
# Build image with tag rakeshpotnuru/productivity-app:server | |
run: | | |
docker build -t chrisantiago217/opendoors:server-${{github.run_number}} -t chrisantiago217/opendoors:server-latest . | |
# Log in to Docker Hub using credentials from repository secrets | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
# Push the Docker images to Docker Hub | |
- name: Push Docker Images to Docker Hub | |
run: | | |
docker push chrisantiago217/opendoors:client-${{github.run_number}} | |
docker push chrisantiago217/opendoors:server-${{github.run_number}} | |
docker push chrisantiago217/opendoors:client-latest | |
docker push chrisantiago217/opendoors:server-latest |