1-1. backend build
1-1-1. まずはgithub Actions起動に必要なファイルを作成する
</> Bash
# プロジェクト直下で実行
mkdir -p .github/workflows
touch .github/workflows/deploy-backend.yml
1-1-2. GitHub Actions がちゃんと動く事を検証
.github/workflows/deploy-backend.yml
</> yml
name: Deploy Backend
on:
workflow_dispatch:
jobs:
Deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout source
- uses: actions/Checkout@v4
- name: Show current directory
run: pwd
- name: List files
run: ls -la
その後、下記コマンドでgit push
# 状態確認
git status
# 修正したsource全てをステージング
git add .
# コミットする
git commit -m "コミット内容"
# mainへpush
git push


.github/workflows/deploy-backend.yml修正後

1-1-3. 環境変数(secret key)の設定


