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 : 1
publish-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 배포에서 볼 수있는 사용자 정의 배포 메시지 (예 : ${{ 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
Pull Request에 대한 참석 댓글 (기본값 : true)netlify-config-path: ./netlify.toml
netlify.toml
로의 경로 (기본값 : 정의되지 않은)functions-dir
netlify functions 출력 디렉토리 (기본값 : undefined)alias
배포 URL의 접두사를 지정하고 대문자 또는 특수 문자가 없어야합니다 (기본값 : NetLify Build ID)alias: ${{ github.head_ref }}
분기 배포 접두사를 복제합니다alias: deploy-preview-${{ github.event.number }}
배포 미리보기 접두사를 복제합니다enable-github-deployment
Github에 배포할지 아닌지 (기본값 : 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