👷 调整ci

This commit is contained in:
felinae98 2023-05-19 12:47:17 +08:00
parent e62317bc6c
commit db60666ca6
No known key found for this signature in database
GPG Key ID: 00C8B010587FF610
2 changed files with 1 additions and 40 deletions

View File

@ -1,6 +1,7 @@
name: Release Drafter
on:
workflow_dispatch:
pull_request_target:
branches:
- main

View File

@ -1,40 +0,0 @@
name: Site Deploy(Preview)
on:
pull_request_target:
paths:
- docs/**
- package.json
- yarn.lock
jobs:
preview:
runs-on: ubuntu-latest
concurrency:
group: pull-request-preview-${{ github.event.number }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Build Docs
uses: ./.github/actions/build-docs
- name: Get Deploy Name
run: |
echo "DEPLOY_NAME=deploy-preview-${{ github.event.number }}" >> $GITHUB_ENV
- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v1
with:
publish-dir: "./docs/.vuepress/dist"
production-deploy: false
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy ${{ env.DEPLOY_NAME }}@${{ github.sha }}"
enable-commit-comment: false
alias: ${{ env.DEPLOY_NAME }}
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}