Skip to content

Commit

Permalink
feat: #42 CI/CD pipeline implementation for frontend of powerpayapp (#61
Browse files Browse the repository at this point in the history
)

* feat(CI/CD): testing CI/CD pipeline for deployment of frontend
* feat(CI/CD): properly configured files for frontend deployment
  • Loading branch information
Koufan-De-King committed Mar 6, 2024
1 parent 3bc7343 commit 86a2f15
Show file tree
Hide file tree
Showing 3 changed files with 383 additions and 0 deletions.
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-for-gh

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

# 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
Loading

0 comments on commit 86a2f15

Please sign in to comment.