actions netlify
v3.0.0
Netlifyに展開するためのGitHubアクション

展開URLは、プルリクエストとコメントをコミットします!

GitHubの展開もサポートされています!
# .github/workflows/netlify.yml
name : Build and Deploy to Netlify
on :
push :
pull_request :
jobs :
build :
runs-on : ubuntu-22.04
steps :
- uses : actions/checkout@v4
# ( Build to ./dist or other directory... )
- name : Deploy to Netlify
uses : nwtgck/[email protected]
with :
publish-dir : ' ./dist '
production-branch : master
github-token : ${{ secrets.GITHUB_TOKEN }}
deploy-message : " Deploy from GitHub Actions "
enable-pull-request-comment : false
enable-commit-comment : true
overwrites-pull-request-comment : true
env :
NETLIFY_AUTH_TOKEN : ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID : ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes : 1publish-dir ( "dist"、 "_site")NETLIFY_AUTH_TOKEN :個人アクセストークン>新しいアクセストークンNETLIFY_SITE_ID :チームページ>サイト> [設定]>サイトの詳細>サイト情報> API IDNETLIFY_SITE_IDです。production-branch (「マスター」など)production-deploy :Netlify Production Deployとしての展開(デフォルト:FALSE)github-token: ${{ secrets.GITHUB_TOKEN }}deploy-message netlify deploymentで表示するカスタム展開メッセージ(例: ${{ github.event.pull_request.title }} )enable-pull-request-comment: trueコメント(デフォルト:true)enable-commit-comment: trueコメント(デフォルト:true)enable-commit-status: true githubコミットステータス(デフォルト:true)overwrites-pull-request-comment: true Overwrites Pullリクエストに関するコメント(デフォルト:true)netlify-config-path: ./netlify.toml netlify.tomlへのパス(default:undefined)functions-dir netlify functions outputディレクトリ(デフォルト:未定義)alias展開URLのプレフィックスを指定します。alias: ${{ github.head_ref }} Branch Deploy Prefixを複製しますalias: deploy-preview-${{ github.event.number }} deploy Previewプレフィックスを複製しますenable-github-deployment (デフォルト:true)github-deployment-environment環境Github展開の名前github-deployment-descriptionの説明fails-without-credentials (デフォルト:false)すべてのパス(たとえば、 publish-dir 、 netlify-config-path 、 functions-dir )は、プロジェクトのルートパスまたは絶対パスに関連しています。
deploy-url netlifyによって生成された展開URL npm ci
npm run all