Skip to content

Commit

Permalink
Add GitHub Actions workflow for Nuxt.js deployment to GitHub Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ydah committed Jan 11, 2025
1 parent 8addcd2 commit 119577a
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Nuxt generate and deploy to GitHub Pages
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: 'npm'
- run: npm install
- run: npm run generate
- name: deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist

0 comments on commit 119577a

Please sign in to comment.