Skip to content

feat: new push logic #12

feat: new push logic

feat: new push logic #12

Workflow file for this run

name: Build
on:
push:
branches:
- master
- 'ver/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Branch
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install Dependencies
run: yarn install
- name: Build Docs
run: 'yarn run docs:build'
- name: Push to Publish Branch
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }

Check failure on line 30 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / Build

Invalid workflow file

The workflow is not valid. .github/workflows/build.yml (Line: 30, Col: 25): The expression is not closed. An unescaped ${{ sequence was found, but the closing }} sequence was not found.
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
BRANCH=$(echo ${GITHUB_REF} | sed -e 's/refs\/heads\///')
TARGET_BRANCH="build/${BRANCH}"
COMMIT_MSG=$(git log -1 --pretty=%B)
git checkout -b "${TARGET_BRANCH}"
git add -f docs/.vitepress/dist
git commit -m "${COMMIT_MSG}"
echo "Branch: ${BRANCH}"
echo "Pushing to ${TARGET_BRANCH}"
echo "Commit Message: ${COMMIT_MSG}"
git push origin "${TARGET_BRANCH}"