Skip to content

Commit

Permalink
Update build-ui.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Flohhhhh authored Sep 7, 2024
1 parent 6f0915b commit 031fb64
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/build-ui.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build UI on Changes
name: Build and Deploy

on:
push:
Expand All @@ -8,7 +8,7 @@ on:
paths:
- 'ulc/src/**'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -20,7 +20,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18' # Specify the Node.js version to use
node-version: '18'

- name: Install dependencies
run: |
Expand All @@ -31,3 +31,22 @@ jobs:
run: |
cd ulc/src
npm run build
- name: Copy build output
run: |
mkdir -p html
cp -r ulc/src/dist/* html/
- name: Commit build output
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd html
git init
git config user.name "github-actions"
git config user.email "[email protected]"
git add .
git commit -m "Deploy build output"
git branch -M main
git remote add origin https://github.com/${{ github.repository }}.git
git push --force origin main

0 comments on commit 031fb64

Please sign in to comment.