Skip to content

Workflow file for this run

name: Deploy Preview
on:
pull_request:
branches:
- main # or the branch you want to base the preview on
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js 22
uses: actions/setup-node@v3
with:
node-version: '22' # Specify the version of Node.js you need
- name: Run export
run: |
npm install

Check failure on line 23 in .github/workflows/preview.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/preview.yml

Invalid workflow file

You have an error in your yaml syntax on line 23
npm run export
- name: Deploy to GitHub Pages Preview
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out
publish_branch: gh-pages-preview-${{ github.event.pull_request.number }}
- name: Comment on the PR with the preview link
uses: peter-evans/commit-comment@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
body: |
🚀 Preview of the changes is available at:
https://${{ github.repository_owner }}.github.io/${{ github.repository }}/gh-pages-preview-${{ github.event.pull_request.number }}