Skip to content

Commit

Permalink
Hstojic/trigger docs (#12)
Browse files Browse the repository at this point in the history
* modified publish-docs to trigger docs generation at website repo

* tag example

* accessing tag/branch environment variable

* additional variable

* removed testing branch
  • Loading branch information
hstojic committed Mar 29, 2021
1 parent 86a3f24 commit 615501e
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
# Copyright 2021 The Bellman Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

on:
push:
branches:
- develop

jobs:
docs:
trigger-docs-generation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.7
- run: |
TMPDIR=$(mktemp)
wget -O $TMPDIR https://github.com/jgm/pandoc/releases/download/2.10.1/pandoc-2.10.1-1-amd64.deb
sudo dpkg -i $TMPDIR
pip install poetry
poetry install
pip install -r docs/docs_requirements.txt
poetry run task docsgen
- name: Send dispatch to website repo
run: |
curl -X POST https://api.github.com/repos/Bellman-devs/Bellman-devs.github.io/dispatches \
-H 'Accept: application/vnd.github.v3+json' \
-u ${{ secrets.ACCESS_TOKEN }} \
--data '{"event_type": "PushOnDevelopBranch", "client_payload": { "repository": "'"$GITHUB_REPOSITORY"'", "tag": "'"$GITHUB_REF"'"}}'

0 comments on commit 615501e

Please sign in to comment.