Migrate deploy-docs to reusable WF from Spring IO

This commit is contained in:
Artem Bilan
2023-12-22 13:34:23 -05:00
parent 8a5f83afc3
commit c4cf366281

View File

@@ -1,32 +1,19 @@
name: Deploy Docs
on:
push:
branches-ignore: [ gh-pages ]
tags: '**'
repository_dispatch:
types: request-build-reference # legacy
schedule:
- cron: '0 10 * * *' # Once per day at 10am UTC
branches:
- '*.x'
- main
tags:
- '**'
workflow_dispatch:
permissions:
actions: write
jobs:
build:
runs-on: ubuntu-latest
dispatch-docs-build:
if: github.repository_owner == 'spring-projects'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: docs-build
fetch-depth: 1
- name: Dispatch (partial build)
if: github.ref_type == 'branch'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh workflow run deploy-docs.yml -r $(git rev-parse --abbrev-ref HEAD) -f build-refname=${{ github.ref_name }}
- name: Dispatch (full build)
if: github.ref_type == 'tag'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh workflow run deploy-docs.yml -r $(git rev-parse --abbrev-ref HEAD)
uses: spring-io/spring-github-workflows/.github/workflows/spring-deploy-docs.yml@main