diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index 5409ff6..6b94c35 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -96,6 +96,7 @@ jobs: # https://github.com/amondnet/vercel-action/issues/170 が解決したら最新のタグに更新 - uses: amondnet/vercel-action@1d26fa06fdab094080b48d33eea2031cee54724d + if: github.ref != 'refs/heads/main' with: vercel-token: ${{ secrets.VERCEL_TOKEN }} vercel-org-id: ${{ secrets.VERCEL_ORG_ID}} @@ -103,6 +104,16 @@ jobs: working-directory: ./ scope: "kxcinc" github-comment: true + - uses: amondnet/vercel-action@1d26fa06fdab094080b48d33eea2031cee54724d + if: github.ref == 'refs/heads/main' + with: + vercel-token: ${{ secrets.VERCEL_TOKEN }} + vercel-org-id: ${{ secrets.VERCEL_ORG_ID}} + vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID}} + working-directory: ./ + scope: "kxcinc" + vercel-args: '--prod' + github-comment: true setup-ocaml-checked: needs: build diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6942ddc..2912c86 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,6 +1,10 @@ name: vercel deploy on: + # deploy on main pushed + push: + branches: + - main # 一応動確のために手動で GitHub Actions を実行可能にする # その際の引数として checkout 時の ref を渡している # default 部分はリポジトリに設定されているデフォルトブランチを指定する @@ -25,7 +29,8 @@ jobs: ocaml-version: - 4.13.1 - if: github.repository == 'kxcinc/bindoj' + ## disable this workflow for now + if: ${{ failure() && github.repository == 'kxcinc/bindoj' }} runs-on: ${{ matrix.os }} steps: @@ -66,6 +71,6 @@ jobs: vercel-org-id: ${{ secrets.VERCEL_ORG_ID}} vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID}} working-directory: ./ - scope: "kxcteam" + scope: "kxcinc" vercel-args: '--prod' github-comment: false