cpprefjp / site

cpprefjpサイトのMarkdownソース
https://cpprefjp.github.io/
368 stars 152 forks source link

fix: CIのactionsをnode16以降対応に切り替える #1221

Closed yumetodo closed 6 months ago

yumetodo commented 6 months ago

動機

CIの実行時に次のような警告が出ています。

The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions/setup-python@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/

actionsたちはnodejsで動くわけですがこのnodejsのバージョンアップ対応となります。

対象としたactions

それぞれchange logを確認し、破壊的変更がないことを確認しました。

その他

kunaiのビルドに、setup-nodeとかを使わずにいきなりnpmコマンドを呼び出していますが、

https://github.com/cpprefjp/site/blob/041ff2d5575a2b81f67f3265a126ee57cd54d4aa/.github/workflows/script/build.sh#L7-L11

下記CIよりnode18に対応しているということらしいのでnode version upの影響を受けないと判断しました。

https://github.com/cpprefjp/kunai/blob/master/.github/workflows/build.yml

yumetodo commented 6 months ago

outer link checkの動作確認

https://github.com/cpprefjp/site/actions/runs/7290759678

yumetodo commented 6 months ago

setup-pythonにはキャッシュ機能がついたので、site_generatorのpip installをキャッシュすることも考えたが、本PRのスコープ外として対応しない。

yumetodo commented 6 months ago

@faithandbrave ご相談なのですが、 build.yml の更新の確認をどう実施するか悩んでいます。全部実行すると実際にデプロイされてしまうので、もし結果が壊れてしまうとまずいなと懸念しています。

faithandbrave commented 6 months ago

ありがとうございます。 まじめに検証するなら検証用のリポジトリを作ってやってみるのがいいでしょうが、今回はだめだったらrevertするのでいい気がします。 yumetodoさんがマージ後の動作を確認できるタイミングでマージされるのがよいかと思います。

yumetodo commented 6 months ago

今から試しにマージしてみます。何かあったらrevertします。

yumetodo commented 6 months ago

https://github.com/cpprefjp/site/actions/runs/7306496979/job/19911247540

building...

yumetodo commented 6 months ago

jobは成功しましたね

yumetodo commented 6 months ago

表示、検索のサジェスト、サイドバー、特に問題は見つかってないですね。kunaiのビルド周りでめっちゃ警告出てますが、このPRのせいではないと思うので、見なかったことにします。

faithandbrave commented 6 months ago

対応ありがとうございます。