Open19
Github Action & React + Vite
![KosukeUchida](https://res.cloudinary.com/zenn/image/fetch/s--qb7DeAim--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_70/https://storage.googleapis.com/zenn-user-upload/avatar/11c357c21f.jpeg)
↓これ試そう
![KosukeUchida](https://res.cloudinary.com/zenn/image/fetch/s--qb7DeAim--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_70/https://storage.googleapis.com/zenn-user-upload/avatar/11c357c21f.jpeg)
Nodejs in Devcontainer
![KosukeUchida](https://res.cloudinary.com/zenn/image/fetch/s--qb7DeAim--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_70/https://storage.googleapis.com/zenn-user-upload/avatar/11c357c21f.jpeg)
devcontainerを立ち上げるまで実施
![KosukeUchida](https://res.cloudinary.com/zenn/image/fetch/s--qb7DeAim--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_70/https://storage.googleapis.com/zenn-user-upload/avatar/11c357c21f.jpeg)
立ち上げたら以下を実施
![KosukeUchida](https://res.cloudinary.com/zenn/image/fetch/s--qb7DeAim--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_70/https://storage.googleapis.com/zenn-user-upload/avatar/11c357c21f.jpeg)
repository
![KosukeUchida](https://res.cloudinary.com/zenn/image/fetch/s--qb7DeAim--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_70/https://storage.googleapis.com/zenn-user-upload/avatar/11c357c21f.jpeg)
devcontainer の node.js image version
![KosukeUchida](https://res.cloudinary.com/zenn/image/fetch/s--qb7DeAim--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_70/https://storage.googleapis.com/zenn-user-upload/avatar/11c357c21f.jpeg)
20 を指定した
![KosukeUchida](https://res.cloudinary.com/zenn/image/fetch/s--qb7DeAim--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_70/https://storage.googleapis.com/zenn-user-upload/avatar/11c357c21f.jpeg)
SWCとはRust製のコンパイラです
![KosukeUchida](https://res.cloudinary.com/zenn/image/fetch/s--qb7DeAim--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_70/https://storage.googleapis.com/zenn-user-upload/avatar/11c357c21f.jpeg)
パッケージマネージャーには yarnを
![KosukeUchida](https://res.cloudinary.com/zenn/image/fetch/s--qb7DeAim--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_70/https://storage.googleapis.com/zenn-user-upload/avatar/11c357c21f.jpeg)
Vite公式
![KosukeUchida](https://res.cloudinary.com/zenn/image/fetch/s--qb7DeAim--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_70/https://storage.googleapis.com/zenn-user-upload/avatar/11c357c21f.jpeg)
プロジェクト作成
yarn create vite . --template react-swc-ts
![KosukeUchida](https://res.cloudinary.com/zenn/image/fetch/s--qb7DeAim--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_70/https://storage.googleapis.com/zenn-user-upload/avatar/11c357c21f.jpeg)
静的サイトのデプロイ
yarn build
![KosukeUchida](https://res.cloudinary.com/zenn/image/fetch/s--qb7DeAim--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_70/https://storage.googleapis.com/zenn-user-upload/avatar/11c357c21f.jpeg)
github branch publishing
![KosukeUchida](https://res.cloudinary.com/zenn/image/fetch/s--qb7DeAim--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_70/https://storage.googleapis.com/zenn-user-upload/avatar/11c357c21f.jpeg)
github actions で devからprodへのpushを自動化
![KosukeUchida](https://res.cloudinary.com/zenn/image/fetch/s--qb7DeAim--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_70/https://storage.googleapis.com/zenn-user-upload/avatar/11c357c21f.jpeg)
Github PAT create
![KosukeUchida](https://res.cloudinary.com/zenn/image/fetch/s--qb7DeAim--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_70/https://storage.googleapis.com/zenn-user-upload/avatar/11c357c21f.jpeg)
dry run は以下より実行可能
true = dry run / false = not dry run
![KosukeUchida](https://res.cloudinary.com/zenn/image/fetch/s--qb7DeAim--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_70/https://storage.googleapis.com/zenn-user-upload/avatar/11c357c21f.jpeg)
prod への deploy 完了
Vite + React + node( LTS20 + yarn )
![KosukeUchida](https://res.cloudinary.com/zenn/image/fetch/s--qb7DeAim--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_70/https://storage.googleapis.com/zenn-user-upload/avatar/11c357c21f.jpeg)
build test の action を追加
![KosukeUchida](https://res.cloudinary.com/zenn/image/fetch/s--qb7DeAim--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_70/https://storage.googleapis.com/zenn-user-upload/avatar/11c357c21f.jpeg)
github の無料プランだとブランチへのマージ不可の設定はできなかったので、 プライベートリポジトリであるdevリポジトリには適用不可
ただし、testのaction にはpushの度にaction実行されるようにしたのでタグつける前に確認すること