Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI/CD pipeline implementation for frontend of powerpayapp #61

Merged
merged 17 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
c31a70f
feat(CI/CD):testing CI/CD pipeline for deployment of frontend 1
Koufan-De-King Mar 5, 2024
60eb7e4
feat(CI/CD):testing CI/CD pipeline for deployment of frontend 2
Koufan-De-King Mar 5, 2024
4645c82
feat(CI/CD):testing CI/CD pipeline for deployment of frontend 3
Koufan-De-King Mar 5, 2024
82faf71
feat(CI/CD):testing CI/CD pipeline for deployment of frontend 4
Koufan-De-King Mar 5, 2024
f9ff792
feat(CI/CD):testing CI/CD pipeline for deployment of frontend 5
Koufan-De-King Mar 5, 2024
5979087
feat(CI/CD):testing CI/CD pipeline for deployment of frontend 6
Koufan-De-King Mar 5, 2024
a905263
feat(CI/CD):testing CI/CD pipeline for deployment of frontend 7
Koufan-De-King Mar 5, 2024
8e544ad
feat(CI/CD):testing CI/CD pipeline for deployment of frontend 7
Koufan-De-King Mar 5, 2024
f5da932
feat(CI/CD):testing CI/CD pipeline for deployment of frontend 7
Koufan-De-King Mar 5, 2024
94cbf8a
feat(CI/CD):testing CI/CD pipeline for deployment of frontend 7
Koufan-De-King Mar 5, 2024
d2fb1af
feat(CI/CD):testing CI/CD pipeline for deployment of frontend 11
Koufan-De-King Mar 5, 2024
237493d
feat(CI/CD):testing CI/CD pipeline for deployment of frontend 11
Koufan-De-King Mar 5, 2024
57ac7c6
feat(CI/CD):testing CI/CD pipeline for deployment of frontend 13
Koufan-De-King Mar 5, 2024
ce53d95
feat(CI/CD):added CI/CD pipeline for deployment of frontend
Koufan-De-King Mar 5, 2024
d50f49b
fix(CI/CD):properly configured files for frontend deployment
Koufan-De-King Mar 6, 2024
d196e4b
fix(CI/CD):properly configured files for frontend deployment
Koufan-De-King Mar 6, 2024
34101e2
fix(CI/CD):properly configured files for frontend deployment
Koufan-De-King Mar 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/build-and-deploy-pwa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build and deploy frontend

on:
push:
branches:
- main

jobs:
# Build Job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 20
- name: Install Dependencies
run: cd power-pay-frontend && npm ci

- name: Build Project
run: cd power-pay-frontend && npm run build

- name: Upload artifact to enable deployment
uses: actions/upload-artifact@v3
with:
name: production-files
path: power-pay-frontend
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why taking this path? Why not power-pay-frontend/build ?

Copy link
Collaborator Author

@Koufan-De-King Koufan-De-King Mar 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was aiming for a match between the path and the publish_dir. Should I also change the publish_dir to the same or just the path?


# Deploy Job
deploy:
# Add a dependency to the build job
needs: build
# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: production-files
path: power-pay-frontend
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.DEPLOYTOKEN }}
publish_dir: power-pay-frontend
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '4.1'
version: '3.7'

services:
api:
Expand Down
4 changes: 2 additions & 2 deletions power-pay-frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="icon" type="image/svg+xml" href="./public/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
<script type="module" src="./src/main.tsx"></script>
</body>
</html>
Loading