ci.优化文档发布 CI/CD

This commit is contained in:
Alisa
2022-05-07 03:16:01 +08:00
committed by GitHub
parent 18013cd428
commit 19af9382b8

View File

@@ -4,14 +4,12 @@ on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- master
paths:
- "docs/*"
workflow_dispatch:
jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
build_and_deploy:
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
@@ -30,16 +28,3 @@ jobs:
app_location: "/docs" # App source code path
api_location: "" # Api source code path - optional
output_location: ".vuepress/dist" # Built app content directory - optional
###### End of Repository/Build Configurations ######
close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_GENTLE_DESERT_00290F400 }}
action: "close"