actions netlify
v3.0.0
การกระทำของ GitHub สำหรับการปรับใช้เพื่อ netlify

การปรับใช้ 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_IDproduction-branch (เช่น "Master")production-deploygithub-token: ${{ secrets.GITHUB_TOKEN }}deploy-message ข้อความปรับใช้ที่กำหนดเองเพื่อดูในการปรับใช้ netlify (เช่น ${{ github.event.pull_request.title }} )enable-pull-request-comment: true ในคำขอดึง (ค่าเริ่มต้น: จริง)enable-commit-comment: true เกี่ยวกับ GitHub Commit (ค่าเริ่มต้น: จริง)enable-commit-status: true GitHub Pommit Status (ค่าเริ่มต้น: TRUE)overwrites-pull-request-comment: true เขียนทับความคิดเห็นในคำขอดึง (ค่าเริ่มต้น: จริง)netlify-config-path: ./netlify.toml พา ธ ไปยัง netlify.toml (ค่าเริ่มต้น: undefined)functions-dir ไดเรกทอรีเอาต์พุตฟังก์ชั่นฟังก์ชั่น (ค่าเริ่มต้น: ไม่ได้กำหนด)alias ระบุคำนำหน้าสำหรับ URL การปรับใช้จะต้องไม่มีตัวพิมพ์ใหญ่หรืออักขระพิเศษ (ค่าเริ่มต้น: netlify build id)alias: ${{ github.head_ref }} จำลองคำนำหน้าการปรับใช้สาขาalias: deploy-preview-${{ github.event.number }} จำลองคำนำหน้าการปรับใช้ตัวอย่างคำนำหน้าenable-github-deployment ไม่ว่าจะปรับใช้กับ gitHub (ค่าเริ่มต้น: จริง) หรือไม่)github-deployment-environment environment ชื่อของการปรับใช้ GitHubgithub-deployment-descriptionfails-without-credentials ล้มเหลวหากไม่มีข้อมูลรับรอง (ค่าเริ่มต้น: เท็จ) เส้นทางทั้งหมด (เช่น publish-dir , netlify-config-path , functions-dir ) มีความสัมพันธ์กับเส้นทางรูทหรือเส้นทางสัมบูรณ์ของโครงการ
deploy-url url การปรับใช้ที่สร้างขึ้นโดย netlify npm ci
npm run all