Skip to content

Dispath to production #252

Dispath to production

Dispath to production #252

Workflow file for this run

name: prod dispath
on:
schedule:
# 每天凌晨 2 点(北京时间)运行
- cron: "0 18 * * *"
workflow_dispatch:
# watch:
# types: started
jobs:
trigger:
runs-on: ubuntu-latest
# if: github.event.repository.owner.id == github.event.sender.id
steps:
- name: Extract sha
id: extract
shell: bash
run: |
echo "::set-output name=sha::$(sha=${{ github.sha }}; echo ${sha:0:6})"
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.DISPATCH_TOKEN }}
repository: merico-dev/website-docs
event-type: ${{ github.repository }}/${{ github.ref_name }}-${{ steps.extract.outputs.sha }}
client-payload: '{ "repo": "${{ github.repository }}", "ref": "${{ github.ref_name }}", "sha": "${{ github.sha }}", "env": "prod" }'