Skip to content

Commit 0e1892e

Browse files
committed
Upload the full project: Personal Portfolio
0 parents  commit 0e1892e

File tree

1,339 files changed

+31259
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,339 files changed

+31259
-0
lines changed

.browserslistrc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2+
# For additional information regarding the format and rule options, please see:
3+
# https://github.com/browserslist/browserslist#queries
4+
5+
# For the full list of supported browsers by the Angular framework, please see:
6+
# https://angular.io/guide/browser-support
7+
8+
# You can see what browsers were selected by your queries by running:
9+
# npx browserslist
10+
11+
last 1 Chrome version
12+
last 1 Firefox version
13+
last 2 Edge major versions
14+
last 2 Safari major versions
15+
last 2 iOS major versions
16+
Firefox ESR
17+
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.

.dockerignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
**/.git
2+
**/.github
3+
.editorconfig
4+
**/node_modules
5+
**/build
6+
**/docs
7+
.gitignore
8+
*.zip
9+
*.md
10+
**/.idea
11+
**/.angular

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = tab
7+
indent_size = 4
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.ts]
12+
quote_type = single
13+
14+
[*.md]
15+
max_line_length = off
16+
trim_trailing_whitespace = false

.github/lighthouse/budget.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
[
2+
{
3+
"path": "/*",
4+
"timings": [
5+
{
6+
"metric": "interactive",
7+
"budget": 400000
8+
},
9+
{
10+
"metric": "first-contentful-paint",
11+
"budget": 2000
12+
},
13+
{
14+
"metric": "cumulative-layout-shift",
15+
"budget": 0.5
16+
},
17+
{
18+
"metric": "total-blocking-time",
19+
"budget": 20000
20+
},
21+
{
22+
"metric": "largest-contentful-paint",
23+
"budget": 4500
24+
},
25+
{
26+
"metric": "speed-index",
27+
"budget": 10000
28+
}
29+
],
30+
"resourceSizes": [
31+
{
32+
"resourceType": "script",
33+
"budget": 200
34+
},
35+
{
36+
"resourceType": "total",
37+
"budget": 500
38+
},
39+
{
40+
"resourceType": "image",
41+
"budget": 300
42+
}
43+
],
44+
"resourceCounts": [
45+
{
46+
"resourceType": "third-party",
47+
"budget": 14
48+
}
49+
]
50+
}
51+
]
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"ci": {
3+
"collect": {
4+
"numberOfRuns" : 1,
5+
"staticDistDir": "./build",
6+
"settings": {
7+
"skipAudits": ["redirects-http"],
8+
"preset": "desktop"
9+
}
10+
}
11+
}
12+
}

.github/workflows/fork_start.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Update fork star
2+
3+
on:
4+
fork:
5+
watch:
6+
types:
7+
- started
8+
schedule:
9+
- cron: '0 0 * * *'
10+
workflow_dispatch:
11+
12+
jobs:
13+
update:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: This repo has x stars y forks
17+
uses: ouuan/This-repo-has-x-stars-y-forks-action@v2
18+
with:
19+
token: ${{ secrets.GH_TOKEN_PR }}
20+
template: "Sysco's Personal Portfolio with <starCount> stars ⭐ and <forkCount> forks 🎉."
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: publish-docker-image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
publish-docker-image-on-github-cr:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- name: Login to GitHub Container Registry
16+
uses: docker/login-action@v2
17+
with:
18+
registry: ghcr.io
19+
username: "Sysco"
20+
password: ${{ secrets.CONTAINER_REGISTRY }}
21+
22+
- name: Build 🔧 and Push 📦 the Docker image of my personal portfolio on Github Container Registry
23+
run: |
24+
docker build -t ghcr.io/syyysco/syyysco.github.io:latest .
25+
docker push ghcr.io/syyysco/syyysco.github.io:latest
26+
27+
publish-docker-image-on-dockerhub:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v2
31+
32+
- name: Login to DockerHub
33+
uses: docker/login-action@v2
34+
with:
35+
username: "syyysco"
36+
password: ${{ secrets.DOCKERHUB }}
37+
38+
- name: Build 🔧 and Push 📦 the Docker image of my personal portfolio on Dockerhub
39+
run: |
40+
docker build -t syyysco/syyysco.github.io:latest .
41+
docker push syyysco/syyysco.github.io:latest
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
name: Pull Request Deploy and Audit
2+
on: [pull_request_target]
3+
permissions:
4+
pull-requests: write
5+
jobs:
6+
deploy_and_audit:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- name: Setup NPM
11+
uses: actions/setup-node@v3
12+
with:
13+
node-version: "18.x"
14+
- name: Install Dependency
15+
run: npm install -f
16+
17+
- name: Run npm build
18+
run: npm run build
19+
20+
- name: Add comment to PR
21+
id: loading_lighthouse_comment_to_pr
22+
uses: marocchino/sticky-pull-request-comment@v2
23+
with:
24+
number: ${{ github.event.pull_request.number }}
25+
header: lighthouse
26+
message: |
27+
🚦 Running Lighthouse audit...
28+
29+
- name: Add comment to PR
30+
id: loading_budget_comment_to_pr
31+
uses: marocchino/sticky-pull-request-comment@v2
32+
with:
33+
number: ${{ github.event.pull_request.number }}
34+
header: budget
35+
message: |
36+
⏱ Running budget checks...
37+
38+
- name: Audit URLs using Lighthouse
39+
id: lighthouse_audit
40+
41+
uses: treosh/lighthouse-ci-action@v12
42+
with:
43+
budgetPath: '.github/lighthouse/budget.json'
44+
configPath: '.github/lighthouse/lighthouserc.json'
45+
uploadArtifacts: true
46+
temporaryPublicStorage: true
47+
48+
- name: Format lighthouse result
49+
id: lighthouse_result
50+
uses: actions/github-script@v4
51+
with:
52+
script: |
53+
const links = ${{ steps.lighthouse_audit.outputs.links }}
54+
const results = (${{ steps.lighthouse_audit.outputs.manifest }}).filter(result => result.isRepresentativeRun);
55+
56+
const score = res => res >= 90 ? '🟢' : res >= 50 ? '🟠' : '🔴';
57+
58+
const comment = results.map((result) => {
59+
const summary = result.summary;
60+
const url = result.url;
61+
62+
return `
63+
🌎 [${url}](${url})
64+
⚡️ [Lighthouse report](${links[url]})
65+
66+
| Category | Score |
67+
| --- | --- |
68+
${Object.keys(summary).map((key) => {
69+
const percentage = Math.round(summary[key] * 100);
70+
return `| ${score(percentage)} ${key} | ${percentage} |`;
71+
}).join('\n')}
72+
73+
`;
74+
}).join('---');
75+
76+
core.setOutput("comment", comment);
77+
78+
- name: Format budget result
79+
id: budget_result
80+
uses: actions/github-script@v4
81+
with:
82+
script: |
83+
const assertions = ${{ steps.lighthouse_audit.outputs.assertionResults }};
84+
if (!assertions.length) {
85+
core.setOutput("comment", '✅ Budget met, nothing to see here');
86+
} else {
87+
const comment = assertions.map((result) => {
88+
return `
89+
❌ **${result.auditProperty || ''}.${result.auditId}** failure on [${result.url}](${result.url})
90+
91+
*${result.auditTitle}* - [docs](${result.auditDocumentationLink})
92+
93+
| Actual | Expected |
94+
| --- | --- |
95+
| ${result.actual} | ${result.operator} ${result.expected} |
96+
`;
97+
}).join('---');
98+
99+
core.setOutput("comment", comment);
100+
}
101+
102+
- name: Add Lighthouse comment to PR
103+
id: lighthouse_comment_to_pr
104+
uses: marocchino/sticky-pull-request-comment@v2
105+
with:
106+
number: ${{ github.event.pull_request.number }}
107+
header: lighthouse
108+
message: |
109+
${{ steps.lighthouse_result.outputs.comment }}
110+
111+
- name: Add Budget comment to PR
112+
id: budget_comment_to_pr
113+
uses: marocchino/sticky-pull-request-comment@v2
114+
with:
115+
number: ${{ github.event.pull_request.number }}
116+
header: budget
117+
message: |
118+
${{ steps.budget_result.outputs.comment }}

.gitignore

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/build
5+
/tmp
6+
/out-tsc
7+
# Only exists if Bazel was run
8+
/bazel-out
9+
10+
# dependencies
11+
/node_modules
12+
13+
# profiling files
14+
chrome-profiler-events*.json
15+
16+
# IDEs and editors
17+
/.idea
18+
.project
19+
.classpath
20+
.c9/
21+
*.launch
22+
.settings/
23+
*.sublime-workspace
24+
25+
# IDE - VSCode
26+
.vscode/*
27+
!.vscode/settings.json
28+
!.vscode/tasks.json
29+
!.vscode/launch.json
30+
!.vscode/extensions.json
31+
.history/*
32+
33+
# misc
34+
/.sass-cache
35+
/connect.lock
36+
/coverage
37+
/libpeerconnection.log
38+
npm-debug.log
39+
yarn-error.log
40+
testem.log
41+
/typings
42+
43+
# System Files
44+
.DS_Store
45+
Thumbs.db
46+
node_modules
47+
cmd
48+
.angular
49+
src/assets/model/model.py

Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Stage 1: Compile and Build angular codebase
2+
3+
FROM node:alpine as build
4+
5+
RUN mkdir -p /app
6+
WORKDIR /app
7+
COPY package.json /app
8+
9+
RUN npm install -f
10+
11+
COPY . /app
12+
RUN npm run build
13+
14+
# Stage 2: Serve app with nginx server
15+
16+
FROM nginx:alpine
17+
18+
COPY --from=build /app/build /usr/share/nginx/html
19+
20+
LABEL org.opencontainers.image.source https://github.com/Syyysco/syyysco.github.io
21+
LABEL org.opencontainers.image.description Docker Image of my Personal Portfolio.
22+
23+
EXPOSE 80

0 commit comments

Comments
 (0)