From c4a6bb257e44c5ea71d0a21b589b52bb830e3223 Mon Sep 17 00:00:00 2001 From: Niclas Timle Date: Thu, 21 Mar 2024 01:26:03 +0100 Subject: [PATCH 1/8] Update build_deploy.yml --- .github/workflows/build_deploy.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index 19c92a1..808cc64 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -41,6 +41,9 @@ jobs: - name: Install dependencies run: npm ci + - name: Build + run: npm run build --if-present + - name: Deploy to gh-pages run: | git config --global user.name "${{ github.actor }}" From 15d314a1ac0b9f269b06b772077382c3f69eb479 Mon Sep 17 00:00:00 2001 From: Niclas Timle Date: Thu, 21 Mar 2024 01:31:13 +0100 Subject: [PATCH 2/8] Update build_deploy.yml --- .github/workflows/build_deploy.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index 808cc64..c98b574 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -51,12 +51,12 @@ jobs: git checkout -B gh-pages # Check if there are changes, --porcelain command checks for changes in the entire repository, - if [ -n "$(git status --porcelain)" ]; then + # if [ -n "$(git status --porcelain)" ]; then # Assuming your built files are in /root git add -A - git commit -m "Update gh-pages" + git commit -m "Update gh-pages" --allow-empty git push -f origin gh-pages - else - echo "No changes to commit." - fi + #else + #echo "No changes to commit." + #fi From d566f9817398de91d83a447c7226aa7bd3855eb4 Mon Sep 17 00:00:00 2001 From: Niclas Timle Date: Thu, 21 Mar 2024 01:44:45 +0100 Subject: [PATCH 3/8] Update build_deploy.yml --- .github/workflows/build_deploy.yml | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index c98b574..eba7495 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -40,22 +40,28 @@ jobs: - name: Install dependencies run: npm ci - + - name: Build - run: npm run build --if-present + run: npm run build -- --prod --base-href "https://Carpenteri1.github.io/Portfolio/" + + - name: Deploy to GitHub Pages + uses: JamesIves/github-pages-deploy-action@4.1.5 + with: + branch: gh-pages + folder: dist/Portfolio - - name: Deploy to gh-pages - run: | - git config --global user.name "${{ github.actor }}" - git config --global user.email "${{ github.actor }}@users.noreply.github.com" - git checkout -B gh-pages + #- name: Deploy to gh-pages + #run: | + #git config --global user.name "${{ github.actor }}" + #git config --global user.email "${{ github.actor }}@users.noreply.github.com" + #git checkout -B gh-pages # Check if there are changes, --porcelain command checks for changes in the entire repository, # if [ -n "$(git status --porcelain)" ]; then # Assuming your built files are in /root - git add -A - git commit -m "Update gh-pages" --allow-empty - git push -f origin gh-pages + #git add -A + #git commit -m "Update gh-pages" --allow-empty + #git push -f origin gh-pages #else #echo "No changes to commit." #fi From 4ed14d806a386ab25282683f7a44ed8563c171e6 Mon Sep 17 00:00:00 2001 From: Niclas Timle Date: Thu, 21 Mar 2024 01:47:22 +0100 Subject: [PATCH 4/8] Update build_deploy.yml --- .github/workflows/build_deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index eba7495..91c88b7 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -42,8 +42,8 @@ jobs: run: npm ci - name: Build - run: npm run build -- --prod --base-href "https://Carpenteri1.github.io/Portfolio/" - + run: ng build --configuration production --base-href "https://Carpenteri1.github.io/Portfolio/" + - name: Deploy to GitHub Pages uses: JamesIves/github-pages-deploy-action@4.1.5 with: From 4e6fc4f55e01518172dbc39b68ef01a83b076a5c Mon Sep 17 00:00:00 2001 From: Niclas Timle Date: Thu, 21 Mar 2024 01:49:22 +0100 Subject: [PATCH 5/8] Update build_deploy.yml --- .github/workflows/build_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index 91c88b7..f5d9412 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -42,7 +42,7 @@ jobs: run: npm ci - name: Build - run: ng build --configuration production --base-href "https://Carpenteri1.github.io/Portfolio/" + run: npm run build -- --configuration production --base-href "https://Carpenteri1.github.io/Portfolio/" - name: Deploy to GitHub Pages uses: JamesIves/github-pages-deploy-action@4.1.5 From c1dd885e8a567b4361cf286e77dcdb53f8d9cd44 Mon Sep 17 00:00:00 2001 From: Niclas Timle Date: Thu, 21 Mar 2024 01:53:15 +0100 Subject: [PATCH 6/8] Update build_deploy.yml --- .github/workflows/build_deploy.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index f5d9412..ff9bf49 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -43,7 +43,10 @@ jobs: - name: Build run: npm run build -- --configuration production --base-href "https://Carpenteri1.github.io/Portfolio/" - + + - name: List dist directory + run: ls dist + - name: Deploy to GitHub Pages uses: JamesIves/github-pages-deploy-action@4.1.5 with: From f03c66cf04cb68c21add8dcd07fa7c6a226614a9 Mon Sep 17 00:00:00 2001 From: Niclas Timle Date: Thu, 21 Mar 2024 01:56:42 +0100 Subject: [PATCH 7/8] Update build_deploy.yml --- .github/workflows/build_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index ff9bf49..31ed333 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -51,7 +51,7 @@ jobs: uses: JamesIves/github-pages-deploy-action@4.1.5 with: branch: gh-pages - folder: dist/Portfolio + folder: dist/portfolio #- name: Deploy to gh-pages #run: | From 5bb5d9ca69c3bded7b2f16b75944ef30ff9a4ea8 Mon Sep 17 00:00:00 2001 From: Niclas Timle Date: Thu, 21 Mar 2024 02:02:33 +0100 Subject: [PATCH 8/8] Update and rename build_deploy.yml and cleanup code --- ...ld_deploy.yml => build_execute_deploy.yml} | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) rename .github/workflows/{build_deploy.yml => build_execute_deploy.yml} (62%) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_execute_deploy.yml similarity index 62% rename from .github/workflows/build_deploy.yml rename to .github/workflows/build_execute_deploy.yml index 31ed333..237090f 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_execute_deploy.yml @@ -1,4 +1,4 @@ -name: Build And Deploy gh-pages +name: Build And Execute Deploy To gh-pages on: push: @@ -52,20 +52,3 @@ jobs: with: branch: gh-pages folder: dist/portfolio - - #- name: Deploy to gh-pages - #run: | - #git config --global user.name "${{ github.actor }}" - #git config --global user.email "${{ github.actor }}@users.noreply.github.com" - #git checkout -B gh-pages - - # Check if there are changes, --porcelain command checks for changes in the entire repository, - # if [ -n "$(git status --porcelain)" ]; then - # Assuming your built files are in /root - #git add -A - #git commit -m "Update gh-pages" --allow-empty - #git push -f origin gh-pages - #else - #echo "No changes to commit." - #fi -