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

feat: New Design #2

Merged
merged 3 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
108 changes: 108 additions & 0 deletions .github/workflows/continuous-deployment-multiple-branches.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
#name: Continuous Deployment
#
#on:
# push:
# branches:
# - "**"
#
## Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
#permissions:
# contents: read
# pages: write
# id-token: write
# actions: read
#
## Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
#concurrency:
# group: "pages"
# cancel-in-progress: true
#
#jobs:
# build_matrix:
# runs-on: ubuntu-latest
# outputs:
# json_branches: ${{ steps.generate-matrix.outputs.json_branches }}
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Generate Matrix
# id: generate-matrix
# run: |
# branches=($(git branch -r | cut -c 3- | sed 's/origin\///g'))
# json_branches=$(printf '%s\n' "${branches[@]}" | jq -R . | jq -s -c .)
# echo "json_branches=${json_branches}" >> $GITHUB_OUTPUT
#
# build:
# runs-on: ubuntu-latest
# name: Build
# needs:
# - build_matrix
# strategy:
# matrix:
# branch: ${{ fromJSON(needs.build_matrix.outputs.json_branches) }}
# steps:
# - uses: actions/checkout@v4
# with:
# ref: ${{ matrix.branch }}
# - uses: actions/setup-node@v4
# with:
# node-version: 20
# - name: Build
# run: |
# npm install
# npm run build
# - uses: actions/upload-artifact@v3
# with:
# name: ${{ strategy.job-index }}
# path: dist/cv/browser/
## - name: Build
## run: |
## git for-each-ref --shell \
## --format='git checkout \
## refs/heads/
#
# deploy:
# runs-on: ubuntu-latest
# name: Deploy
# environment:
# name: github-pages
# url: ${{ steps.deployment.outputs.page_url }}
# needs:
# - build_matrix
# - build
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Setup Pages
# uses: actions/configure-pages@v3
# - run: gh run download ${{ vars.GITHUB_RUN_ID }} --dir branches
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#
# - name: Create public folder
# run: |
# mkdir public
# mv .github/workflows/index.html ./public/index.html
# cd public
# branches=$(echo '${{ needs.build_matrix.outputs.json_branches }}' | jq -r '.[]')
# i=0
# for branch in ${branches}
# do
# mkdir -p -- $branch
# mv ../branches/$i/* ./$branch
#
# echo "<li><a href=\"./CV/${branch}\">${branch}</a></li>" >> index.html
#
# i=$((i+1))
# done
# cat ../.github/workflows/index_suffix.html >> index.html
# ls -lR
# - name: Upload artifact
# uses: actions/upload-pages-artifact@v2
# with:
# path: ./public/
# - name: Deploy to GitHub Pages
# id: deployment
# uses: actions/deploy-pages@v2
84 changes: 11 additions & 73 deletions .github/workflows/continuous-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,106 +3,44 @@ name: Continuous Deployment
on:
push:
branches:
- "**"
- main

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
actions: read

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
build_matrix:
build-and-deploy:
runs-on: ubuntu-latest
outputs:
json_branches: ${{ steps.generate-matrix.outputs.json_branches }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate Matrix
id: generate-matrix
run: |
branches=($(git branch -r | cut -c 3- | sed 's/origin\///g'))
json_branches=$(printf '%s\n' "${branches[@]}" | jq -R . | jq -s -c .)
echo "json_branches=${json_branches}" >> $GITHUB_OUTPUT

build:
runs-on: ubuntu-latest
name: Build
needs:
- build_matrix
strategy:
matrix:
branch: ${{ fromJSON(needs.build_matrix.outputs.json_branches) }}
name: Build & Deploy
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}
- uses: actions/checkout@v3
- uses: actions/setup-node@v4
with:
# Version Spec of the version to use in SemVer notation.
# It also emits such aliases as lts, latest, nightly and canary builds
# Examples: 12.x, 10.15.1, >=10.15.0, lts/Hydrogen, 16-nightly, latest, node
node-version: 20
- name: Build
run: |
npm install
npm run build
- uses: actions/upload-artifact@v3
with:
name: ${{ strategy.job-index }}
path: dist/cv/browser/
# - name: Build
# run: |
# git for-each-ref --shell \
# --format='git checkout \
# refs/heads/

deploy:
runs-on: ubuntu-latest
name: Deploy
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs:
- build_matrix
- build
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Pages
uses: actions/configure-pages@v3
- run: gh run download ${{ vars.GITHUB_RUN_ID }} --dir branches
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create public folder
run: |
mkdir public
mv .github/workflows/index.html ./public/index.html
cd public
branches=$(echo '${{ needs.build_matrix.outputs.json_branches }}' | jq -r '.[]')
i=0
for branch in ${branches}
do
mkdir -p -- $branch
mv ../branches/$i/* ./$branch

echo "<li><a href=\"./CV/${branch}\">${branch}</a></li>" >> index.html

i=$((i+1))
done
cat ../.github/workflows/index_suffix.html >> index.html
ls -lR
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./public/
path: ./dist/cv/browser/
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
20 changes: 16 additions & 4 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,13 @@
"src/favicon-16x16.png",
"src/favicon-32x32.png",
"src/site.webmanifest",
"src/assets"
"src/assets",
"src/data"
],
"styles": [
"src/styles.scss"
"src/styles.scss",
"node_modules/primeng/resources/themes/lara-light-blue/theme.css",
"node_modules/primeng/resources/primeng.min.css"
],
"scripts": []
},
Expand Down Expand Up @@ -114,11 +117,20 @@
"tsConfig": "tsconfig.spec.json",
"inlineStyleLanguage": "scss",
"assets": [
"src/android-chrome-192x192.png",
"src/android-chrome-512x512.png",
"src/apple-touch-icon.png",
"src/favicon.ico",
"src/assets"
"src/favicon-16x16.png",
"src/favicon-32x32.png",
"src/site.webmanifest",
"src/assets",
"src/data"
],
"styles": [
"src/styles.scss"
"src/styles.scss",
"node_modules/primeng/resources/themes/lara-light-blue/theme.css",
"node_modules/primeng/resources/primeng.min.css"
],
"scripts": []
}
Expand Down
36 changes: 34 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@
"private": true,
"dependencies": {
"@angular/animations": "^17.0.0",
"@angular/cdk": "^17.0.1",
"@angular/common": "^17.0.0",
"@angular/compiler": "^17.0.0",
"@angular/core": "^17.0.0",
"@angular/forms": "^17.0.0",
"@angular/material": "^17.0.1",
"@angular/platform-browser": "^17.0.0",
"@angular/platform-browser-dynamic": "^17.0.0",
"@angular/router": "^17.0.0",
"flag-icons": "^7.1.0",
"gsap": "^3.12.2",
"primeicons": "^6.0.1",
"primeng": "^17.0.0",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.14.2"
Expand Down
Loading