Skip to content

Update check-publish.yaml #379

Update check-publish.yaml

Update check-publish.yaml #379

name: Check and publish
on:
push:
branches:
- 'develop'
- 'master'
- 'main'
tags:
- '**'
pull_request:
branches:
- 'master'
- 'main'
workflow_dispatch: ~
jobs:
docs:
name: Build Readthedocs
runs-on: ubuntu-latest
steps:
- name: Start polytope-docs build
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GH_REPO_READ_TOKEN }}
script: |-
await github.rest.actions.createWorkflowDispatch({
owner: 'ecmwf-projects',
repo: 'polytope-docs',
workflow_id: 'docs.yaml',
ref: 'master'
});
publish:
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
name: Publish on Readthedocs
needs: [docs]
runs-on: ubuntu-latest
steps:
- name: Start polytope-docs build
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GH_REPO_READ_TOKEN }}
script: |-
await github.actions.createWorkflowDispatch({
owner: 'ecmwf-projects',
repo: 'polytope-docs',
workflow_id: 'publish.yaml',
ref: 'master'
});