Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
zakarialaoui10 authored Feb 27, 2024
1 parent 052417d commit 8cc38c6
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,34 @@
name: build
on: [push]

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
- run: npm ci
- run: npm run build --if-present
- name: Commit & Push

- name: Install dependencies
run: npm ci

- name: Build project
run: npm run build --if-present

- name: Commit & Push changes
run: |
git config user.name github-actions
git config user.email [email protected]
git add -A .
git commit -m "auto build"
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
git add -A
git commit -m "Auto build"
git push
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}

0 comments on commit 8cc38c6

Please sign in to comment.