Skip to content

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

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

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

# 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 action@github.com
git remote add lolipop ${{ secrets.MC_REPOSITORY_URL }}
git add .
git commit -m "Add"
git push -f lolipop HEAD:master