Skip to content

Automatic build

Automatic build #371

name: Automatic build
on:
push:
branches: [ stable ]
env:
NODE_VERSION: "14"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: "Checkout code"
uses: actions/checkout@v2
with:
token: ${{ secrets.PUBLIC_PAT_CICD4_PUBLIC }}
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run: |
rm -rf node_modules
npm install
- name: Build files
run: |
npm run build
- name: Commit and push
run: |
git config user.name "plenty-cicd-4"
git config user.email "[email protected]"
git add .
git diff-index --quiet HEAD || git commit -m "Automatic build" && git push origin HEAD:stable