Skip to content

fix: build error

fix: build error #161

name: git push into another repo to deploy to vercel
on:
push:
branches: [develop]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check Git version
run: git --version
- uses: actions/checkout@v2
- name: Install mustache (to update the date)
run: sudo apt-get update && sudo apt-get install -y ruby && sudo gem install mustache
- name: creates output
run: sh ./build.sh
- name: Pushes to another repository
id: push_directory
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.AUTO_ACTIONS_DEV }}
with:
source-directory: 'output'
destination-github-username: 'rabyeoljji'
destination-repository-name: 'pick-toss-next'
user-email: ${{ secrets.EMAIL_FOR_DEV }}
commit-message: ${{ github.event.commits[0].message }}
target-branch: develop
- name: Sync actions workflows to develop branch
run: |
git clone https://x-access-token:${{ secrets.AUTO_ACTIONS_DEV }}@github.com/rabyeoljji/pick-toss-next.git personal-repo
cd personal-repo
git config --global user.name "github-actions[bot]"
git config --global user.email "${{ secrets.EMAIL_FOR_DEV }}"
git fetch origin actions:actions
git checkout actions
mkdir -p ../output/.github/workflows
cp -r .github/workflows/* ../output/.github/workflows/
git checkout develop
mkdir -p .github/workflows
cp -r ../output/.github/workflows/* .github/workflows/
git add .github/workflows
git commit -m "Sync workflows from actions to develop"
git push origin develop
- name: Test get variable exported by push-to-another-repository
run: echo $DESTINATION_CLONED_DIRECTORY