From d566f9817398de91d83a447c7226aa7bd3855eb4 Mon Sep 17 00:00:00 2001 From: Niclas Timle Date: Thu, 21 Mar 2024 01:44:45 +0100 Subject: [PATCH] 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