vercel deploy #513
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
name: vercel deploy | |
on: | |
# deploy on main pushed | |
push: | |
branches: | |
- main | |
# 一応動確のために手動で GitHub Actions を実行可能にする | |
# その際の引数として checkout 時の ref を渡している | |
# default 部分はリポジトリに設定されているデフォルトブランチを指定する | |
workflow_dispatch: | |
inputs: | |
ref: | |
description: branch|tag|SHA to checkout | |
default: 'main' | |
required: true | |
# 毎日日本時間の 11時 に GitHub Actions が実行される (cron の時刻は UTC) | |
# 実行の際に参照されるブランチは上記の default で指定したものが使用される | |
schedule: | |
- cron: '0 2 * * *' | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
ocaml-version: | |
- 4.13.1 | |
## disable this workflow for now | |
if: ${{ failure() && github.repository == 'kxcinc/bindoj' }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
fetch-depth: 2 | |
- name: Use OCaml ${{ matrix.ocaml-version }} | |
uses: ocaml/setup-ocaml@v2 | |
with: | |
ocaml-compiler: ${{ matrix.ocaml-version }} | |
- name: Cache OPAM switch | |
id: cache-switch | |
uses: actions/cache@v3 | |
with: | |
path: _opam | |
key: v1-${{ runner.os }}-${{ matrix.ocaml-version }}-opam-switch | |
- name: check OCaml version and workspace info | |
run: ./scripts/ci_print_env.sh | |
- run: ./scripts/ci_setup_ubuntu.sh | |
- name: Install dependencies | |
run: opam install . --deps-only --with-test --with-doc | |
- run: opam exec -- make doc | |
# https://github.com/amondnet/vercel-action/issues/170 が解決したら最新のタグに更新 | |
- uses: amondnet/vercel-action@1d26fa06fdab094080b48d33eea2031cee54724d | |
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: false |