Skip to content

Instantly share code, notes, and snippets.

@caendesilva
Created March 8, 2024 10:24
Show Gist options
  • Save caendesilva/453cabb619d2440e6fb58cd845fa679c to your computer and use it in GitHub Desktop.
Save caendesilva/453cabb619d2440e6fb58cd845fa679c to your computer and use it in GitHub Desktop.
Basic Laravel Vite GitHub Actions CI Workflow
name: Build Laravel Vite assets for production
on:
push:
branches: [ "master" ]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v3
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Commit build
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git add public
git commit -m "Build assets for production"
git push
@caendesilva
Copy link
Author

Runs in about 15 seconds!

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment