Skip to content

Commit

Permalink
[promote-production]: May 4, 10:19PM (#34)
Browse files Browse the repository at this point in the history
* [Client]: Refactoring Register UI & Adding more UI components (#17)

* [client]: refactoring register ui

* Add Zustand state management library

* [Client]: Adding more UI components (#19)

* Update README.md

* fixing build issues

* Update README.md

* [Client]: UI Adjustments (#21)

* [client]: integrating sign-in with api (#22)

* Update README.md

* Readme install changes and .gitignore config for IDEs. (#25)

* Add .gitignore ides config folders

* Add to readme yarn install version and one npm command.

* [client-server]: general adjustments (#28)

* Update README.md (#29)

* [client]: fixing build issue (#31)

* chore: Add GitHub Actions workflow for building and deploying the application (#33)

---------

Co-authored-by: Rubier Sorio <[email protected]>
  • Loading branch information
drbarzaga and Alabao authored May 5, 2024
1 parent 2b27ee4 commit 905019c
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# The name of the workflow.
name: Build and Deploy

# Run the workflow when code is pushed to the main branch
on:
push:
branches:
- main

# Set environment variables
env:
MONGODB_URL: ${{ secrets.MONGODB_URL }}

# 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@v2

# Install dependencies and run tests for the client application
- name: Install Client
working-directory: ./client
run: |
npm install
# Install dependencies, export environment variables to be used by application and run tests for the server application
- name: Install Server
working-directory: ./server
run: |
npm install
export MONGODB_URL=$MONGODB_URL
# Build a Docker image for the client application
- name: Build Client Docker Image
working-directory: ./client
# Build image with tag drbarzaga/job-portal:client
run: |
docker build -t drbarzaga/job-portal:client-${{github.run_number}} .
# Build a Docker image for the server application
- name: Build Server Docker Image
working-directory:
./server
# Build image with tag drbarzaga/job-portal:server
run: |
docker build -t drbarzaga/job-portal:server-${{github.run_number}} .
# Login to Docker Hub using credentials from repository secrets
- name: Login to Docker Hub
uses: docker/login-action@v1
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 drbarzaga/job-portal:client-${{github.run_number}}
docker push drbarzaga/job-portal:server-${{github.run_number}}

0 comments on commit 905019c

Please sign in to comment.