Skip to content

Commit

Permalink
Update deploy job
Browse files Browse the repository at this point in the history
  • Loading branch information
rossta committed Dec 18, 2024
1 parent 679ad4c commit edf1372
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,27 @@ jobs:
- name: Upload production-ready build files
uses: actions/upload-artifact@v4
with:
name: production-files
name: github-pages
path: ./dist

deploy:
name: Deploy
# Add a dependency to the build job
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'

steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: production-files
path: ./dist
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
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 }}

# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
id: deployment
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action

0 comments on commit edf1372

Please sign in to comment.