Skip to content

Commit

Permalink
Updated CI Workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
GautamPatil1 committed Mar 25, 2024
1 parent f9ab838 commit 38181d6
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 20 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ on:
jobs:
build-and-push:
runs-on: ubuntu-latest
env:
WDS_SOCKET_PORT: 0
REACT_APP_FIREBASE_API_KEY: ${{ secrets.REACT_APP_FIREBASE_API_KEY }}
REACT_APP_FIREBASE_AUTH_DOMAIN: rezume-a5269.firebaseapp.com
REACT_APP_FIREBASE_PROJECT_ID: rezume-a5269
REACT_APP_FIREBASE_STORAGE_BUCKET: gs://rezume-a5269.appspot.com
REACT_APP_FIREBASE_MESSAGING_SENDER_ID: 60826985488
REACT_APP_FIREBASE_APP_ID: 1:60826985488:web:2637058eb25c03f5d39695
REACT_APP_FIREBASE_MEASUREMENT_ID: G-RVFTFZWE97
REACT_APP_FIREBASE_DATABASE_URL: https://rezume-a5269-default-rtdb.asia-southeast1.firebasedatabase.app/

steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -18,26 +29,16 @@ jobs:
username: gautampatil1
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Set up environment variables
run: |
echo "WDS_SOCKET_PORT=0" >> .env
echo "REACT_APP_FIREBASE_API_KEY=${{ secrets.REACT_APP_FIREBASE_API_KEY }}" >> .env
echo "REACT_APP_FIREBASE_AUTH_DOMAIN=${{ secrets.REACT_APP_FIREBASE_AUTH_DOMAIN }}" >> .env
echo "REACT_APP_FIREBASE_PROJECT_ID=${{ secrets.REACT_APP_FIREBASE_PROJECT_ID }}" >> .env
echo "REACT_APP_FIREBASE_STORAGE_BUCKET=${{ secrets.REACT_APP_FIREBASE_STORAGE_BUCKET }}" >> .env
echo "REACT_APP_FIREBASE_MESSAGING_SENDER_ID=${{ secrets.REACT_APP_FIREBASE_MESSAGING_SENDER_ID }}" >> .env
echo "REACT_APP_FIREBASE_APP_ID=${{ secrets.REACT_APP_FIREBASE_APP_ID }}" >> .env
echo "REACT_APP_FIREBASE_MEASUREMENT_ID=${{ secrets.REACT_APP_FIREBASE_MEASUREMENT_ID }}" >> .env
echo "REACT_APP_FIREBASE_DATABASE_URL=${{ secrets.REACT_APP_FIREBASE_DATABASE_URL }}" >> .env
- name: Build Docker image
run: docker build -t gautampatil1/rezume:latest .

- name: Push Docker image to Docker Hub
run: docker push gautampatil1/rezume:latest

- name: Log in to GitHub Container Registry
run: echo "${{ secrets.GH_PAT }}" | docker login ghcr.io -u gautampatil1 --password-stdin

- name: Push Docker image to ghcr.io
run: |
docker login --username gautampatil1 --password ${{ secrets.GH_PAT }} ghcr.io
docker tag gautampatil1/rezume:latest ghcr.io/gautampatil1/rezume:latest
docker push ghcr.io/gautampatil1/rezume:latest
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@ services:
dockerfile: Dockerfile
ports:
- "3000:80"
env_file:
- .env
8 changes: 4 additions & 4 deletions src/components/Viewer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React, { useEffect, useState } from "react";
import { useParams } from "react-router-dom";
import styles from "./styles/Viewer.module.css";
import { readUserData } from "../firebase";
import Navbar from "./Navbar";

export default function Viewer() {
const { param } = useParams();
Expand Down Expand Up @@ -30,12 +31,11 @@ export default function Viewer() {

return (
<div className={styles.container}>
<Navbar />
<div className={styles.pdf}>
<iframe src={`https://docs.google.com/viewerng/viewer?url=`+fileUrl} frameborder="0"></iframe>
{/* <iframe
<iframe
src={`https://docs.google.com/gview?url=${userData.file}&embedded=true`}
>
</iframe> */}
></iframe>
</div>
</div>
);
Expand Down
14 changes: 13 additions & 1 deletion src/components/styles/Viewer.module.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
.pdf embed, iframe, object{
height: 100vh;
height: 140vh;
width: 100%;
}
*, body{
background-color: black;
}
.react-pdf_Page_Canvas{
background-color: black;
}

.container{
display: flex;
Expand All @@ -10,3 +16,9 @@
width: 100%;
}

@media screen and (max-width: 768px){
.pdf embed, iframe, object{
height: 60vh;
}

}

0 comments on commit 38181d6

Please sign in to comment.