Skip to content

Merge pull request #351 from Tatsumi0000/dependabot/bundler/web/backe… #254

Merge pull request #351 from Tatsumi0000/dependabot/bundler/web/backe…

Merge pull request #351 from Tatsumi0000/dependabot/bundler/web/backe… #254

# https://note.com/mclolipopjp/n/n0e8dace1404b
name: Deploy Rails
on:
push:
branches:
- main
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
sparse-checkout: |
web/backend
- name: add SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
name: id_rsa
known_hosts: ${{ secrets.KNOWN_HOSTS }}
- name: deploy
run: |
cd web/backend
git config --global init.defaultBranch master
git init
git config user.name github-actions
git config user.email [email protected]
git remote add lolipop ${{ secrets.MC_REPOSITORY_URL }}
git add .
git commit -m "Add"
git push -f lolipop HEAD:master