Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(build): resolve sass-embedded native binding error in GitHub Actions #5

fix(build): resolve sass-embedded native binding error in GitHub Actions

fix(build): resolve sass-embedded native binding error in GitHub Actions #5

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Clean install dependencies
run: |
# Clear npm cache and node_modules for clean install
npm cache clean --force
rm -rf node_modules package-lock.json
# Install with legacy peer deps to avoid conflicts
npm install --legacy-peer-deps
# Verify installation
npm list --depth=0
- name: Build with Nuxt
run: npm run generate
env:
NUXT_APP_BASE_URL: /timeboxing/
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./.output/public
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4