Skip to content

Commit be86cfc

Browse files
committed
Refactor GitHub Actions workflow for PR previews: rename deploy-preview job to build, and update deployment steps; update email contact in about.md
1 parent 567f1c8 commit be86cfc

2 files changed

Lines changed: 18 additions & 21 deletions

File tree

.github/workflows/preview.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ concurrency:
1616
cancel-in-progress: false
1717

1818
jobs:
19-
deploy-preview:
19+
build:
2020
runs-on: ubuntu-latest
2121
steps:
2222
- name: Checkout
@@ -33,20 +33,19 @@ jobs:
3333
env:
3434
JEKYLL_ENV: production
3535

36-
- name: Deploy to gh-pages
37-
run: |
38-
# Switch to gh-pages branch
39-
git fetch origin gh-pages:gh-pages || git checkout --orphan gh-pages
40-
git checkout gh-pages
41-
42-
# Clear and copy site
43-
rm -rf * 2>/dev/null || true
44-
cp -r _site/* ./ 2>/dev/null || true
45-
46-
# Commit and push
47-
git add -A
48-
git config user.name "GitHub Actions"
49-
git config user.email "actions@github.com"
50-
git commit -m "Deploy preview from PR #${{ github.event.number }}" || exit 0
51-
git push origin gh-pages
36+
- name: Upload artifact
37+
uses: actions/upload-pages-artifact@v3
38+
with:
39+
path: ./_site
40+
41+
deploy:
42+
environment:
43+
name: github-pages
44+
url: ${{ steps.deployment.outputs.page_url }}
45+
runs-on: ubuntu-latest
46+
needs: build
47+
steps:
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@v4
5251

about.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ This blog is where I share:
2626

2727
Feel free to connect with me:
2828
- **GitHub**: [github.com/devnomadic](https://github.com/devnomadic)
29-
- **Email**: hello@devnomadic.com
29+
- **Email**: drew@devnomadic.com
3030

31-
---
32-
33-
*Currently coding from: [Current Location]*
31+
---

0 commit comments

Comments
 (0)