Skip to content

Commit

Permalink
Update build_deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Carpenteri1 authored Mar 21, 2024
1 parent 15d314a commit d566f98
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions .github/workflows/build_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d566f98

Please sign in to comment.