Merge pull request #385 from Tatsumi0000/dependabot/npm_and_yarn/web/… #274
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |