mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-07 12:23:00 +08:00
ci: 添加发布文档网页
This commit is contained in:
parent
5957ac9719
commit
b2845f7867
26
.github/workflows/release.yml
vendored
26
.github/workflows/release.yml
vendored
@ -83,4 +83,28 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
tags: felinae98/nonebot-bison:${{ github.event.release.tag_name }}-sentry
|
tags: felinae98/nonebot-bison:${{ github.event.release.tag_name }}-sentry
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
|
deploy-web:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup Node Environment
|
||||||
|
uses: ./.github/actions/setup-node
|
||||||
|
|
||||||
|
- name: Build Docs
|
||||||
|
run: yarn docs:build
|
||||||
|
|
||||||
|
- name: Deploy to Netlify
|
||||||
|
uses: nwtgck/actions-netlify@v1
|
||||||
|
with:
|
||||||
|
publish-dir: "./docs/.vuepress/dist"
|
||||||
|
production-deploy: true
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
deploy-message: "Deploy ${{ github.event.release.tag_name }}"
|
||||||
|
enable-commit-comment: false
|
||||||
|
alias: ${{ github.event.release.tag_name }}
|
||||||
|
env:
|
||||||
|
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||||||
|
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
||||||
|
39
.github/workflows/website-preview.yml
vendored
Normal file
39
.github/workflows/website-preview.yml
vendored
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
name: Site Deploy(Preview)
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
|
||||||
|
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: Setup Node Environment
|
||||||
|
uses: ./.github/actions/setup-node
|
||||||
|
|
||||||
|
- name: Build Docs
|
||||||
|
run: yarn docs:build
|
||||||
|
|
||||||
|
- 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 }}
|
Loading…
x
Reference in New Issue
Block a user