From 5b69cb30d32cae9b449e95ffb144d4afbab9855f Mon Sep 17 00:00:00 2001 From: 0xbadbee Date: Wed, 14 Aug 2024 08:42:53 +0200 Subject: [PATCH] Add git push --- .github/workflows/build_commit_web.yml | 67 +++++++++++++++----------- 1 file changed, 40 insertions(+), 27 deletions(-) diff --git a/.github/workflows/build_commit_web.yml b/.github/workflows/build_commit_web.yml index 73d70fbf..9f5e78ae 100644 --- a/.github/workflows/build_commit_web.yml +++ b/.github/workflows/build_commit_web.yml @@ -1,35 +1,48 @@ name: Make web and commit on: - workflow_dispatch: + workflow_dispatch: jobs: build: runs-on: ubuntu-latest - + steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - submodules: recursive - - - name: Make Web - run: make web - - - name: Configure Git - run: | - git config --global user.email "scilor@users.noreply.github.com" - git config --global user.name "SciLor" - - - name: Git status tonies-ota-backup - run: | - git status - - name: Commit and push if changed tonies-ota-backup - run: | - if [[ -n $(git status --porcelain) ]]; then - git add . - git commit -m "Update webinterface" - git pull --rebase - else - echo "No changes to commit and push." - fi + - name: Checkout code + uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Update teddycloud_web submodule + run: git submodule update --remote teddycloud_web + + - uses: actions/setup-node@v4 + with: + node-version: "20.11.1" + - name: Install NPM version + run: npm install -g npm@10.2.4 + + - name: Disable CI checks + run: echo "CI=false" >> $GITHUB_ENV + + - name: Make Web + run: make web + + - name: Configure Git + run: | + git config --global user.email "scilor@users.noreply.github.com" + git config --global user.name "SciLor" + + - name: Git status + run: | + git status + - name: Commit and push if changed + run: | + if [[ -n $(git status --porcelain) ]]; then + git add . + git commit -m "Update frontend (make web)" + git pull --rebase + git push + else + echo "No changes to commit and push." + fi