Skip to content

Commit

Permalink
Merge pull request #22 from vasgat/main
Browse files Browse the repository at this point in the history
add github workflow and remove reduntant component
  • Loading branch information
vasgat authored Dec 6, 2024
2 parents 3ee8edb + b6dfd1d commit 251a416
Show file tree
Hide file tree
Showing 16 changed files with 88 additions and 717 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/docker-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build and publish Docker image

on:
push:
branches: [ main, staging ]
paths:
- 'dist/**'
- 'docker/**'

jobs:
build-and-push-image:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/[email protected]

- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for Docker
id: meta
uses: docker/[email protected]
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=raw,value={{sha}}
- name: Build and push Docker image
uses: docker/[email protected]
with:
push: true
file: docker/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
232 changes: 0 additions & 232 deletions dist/msa-dashboard/assets/charts/beesworm.json

This file was deleted.

2 changes: 1 addition & 1 deletion dist/msa-dashboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@
<app-root></app-root>
<script src="https://use.fontawesome.com/eacca44f89.js"></script>
<script type="text/javascript" src="https://js.createsend1.com/javascript/copypastesubscribeformlogic.js"></script>
<script src="runtime.4d9be08b5519a318.js" type="module"></script><script src="polyfills.9b667fdefd80ddcd.js" type="module"></script><script src="scripts.b92344386afd2268.js" defer></script><script src="main.51a61bfb172bd395.js" type="module"></script>
<script src="runtime.4d9be08b5519a318.js" type="module"></script><script src="polyfills.9b667fdefd80ddcd.js" type="module"></script><script src="scripts.b92344386afd2268.js" defer></script><script src="main.d55817a04f340f6b.js" type="module"></script>

</body></html>
1 change: 0 additions & 1 deletion dist/msa-dashboard/main.51a61bfb172bd395.js

This file was deleted.

1 change: 1 addition & 0 deletions dist/msa-dashboard/main.d55817a04f340f6b.js

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions docker/dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Use the official Nginx image as the base image
FROM nginx:latest

# Copy your static site files to the Nginx default directory
COPY ../dist/msa-dashboard /usr/share/nginx/html

# Copy custom Nginx configuration
COPY nginx.conf /etc/nginx/nginx.conf

# Expose port 80 to allow traffic
EXPOSE 80

# Start Nginx
CMD ["nginx", "-g", "daemon off;"]
29 changes: 29 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
worker_processes 1;

events { worker_connections 1024; }

http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;

server {
listen 80;
server_name localhost;

root /usr/share/nginx/html;

# Serve Angular routes correctly
location / {
try_files $uri $uri/ /index.html;
}

# Optional: Cache static files
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
try_files $uri =404;
expires 1M;
add_header Cache-Control "public";
}
}
}
4 changes: 0 additions & 4 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ import {ActivatedRoute, RouterModule, Routes} from '@angular/router';
import {DashboardComponent} from "./dashboard/dashboard.component";
import {AboutComponent} from "./about/about.component";
import {KeyFindingsSectionComponent} from "./dashboard/key-findings-section/key-findings-section.component";
import {
AssessedStatementsOverviewComponent
} from "./dashboard/assessed-statments-overview/assessed-statements-overview.component";
import {
MinimumRequirementsSectionComponent
} from "./dashboard/minimum-requirements-section/minimum-requirements-section.component";
Expand All @@ -20,7 +17,6 @@ const routes: Routes = [
path: 'dashboard/:sector', component: DashboardComponent
},
{path: 'dashboard/key-findings/:sector', component: KeyFindingsSectionComponent},
{path: 'dashboard/assessed-statements-overview/:sector', component: AssessedStatementsOverviewComponent},
{path: 'dashboard/meeting-minimum-requirements/:sector', component: MinimumRequirementsSectionComponent},
{path: 'dashboard/going-beyond-compliance/:sector', component: GoingBeyondComplianceComponent},
{path: 'dashboard/further-findings/:sector', component: FurtherFindingsComponent},
Expand Down
2 changes: 0 additions & 2 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {DataProvider} from "./services/data.provider";
import {NumFormatPipe} from "./pipes/num-format.pipe";
import {ChartsService} from "./services/charts.service";
import { GoingBeyondComplianceComponent } from './dashboard/going-beyond-compliance/going-beyond-compliance.component';
import { AssessedStatementsOverviewComponent } from './dashboard/assessed-statments-overview/assessed-statements-overview.component';
import {PercentageFormatPipe} from "./pipes/percentage-format.pipe";
import { DisclosureRatesComponent } from './dashboard/disclosure-rates/disclosure-rates.component';
import { ApproachToPoliciesComponent } from './dashboard/further-findings-alternative-two/approach-to-policies/approach-to-policies.component';
Expand Down Expand Up @@ -82,7 +81,6 @@ const cookieConfig:NgcCookieConsentConfig = {
NumFormatPipe,
PercentageFormatPipe,
GoingBeyondComplianceComponent,
AssessedStatementsOverviewComponent,
DisclosureRatesComponent,
ApproachToIncidentsComponent,
ApproachToRisksComponent,
Expand Down
Loading

0 comments on commit 251a416

Please sign in to comment.