Skip to content

Commit

Permalink
refactor: Update GitHub Pages deployment workflow to include lazy loa…
Browse files Browse the repository at this point in the history
…ding for images
  • Loading branch information
jyzhao committed Aug 14, 2024
1 parent db64385 commit 0c7985b
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/publish-to-github-page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ jobs:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -26,12 +31,6 @@ jobs:
- name: Build the React app
run: npm run build

- name: Configure Git
run: |
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git config --global user.name "${{ github.actor }}"
- name: Deploy to GitHub Pages
run: npm run deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
id: deployment
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action

0 comments on commit 0c7985b

Please sign in to comment.