This is an automated email from the ASF dual-hosted git repository. tvb pushed a commit to branch tristan/test-workflows in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit e52715c927d79b954e2d80700917d85d18e7347f Author: Tristan van Berkom <[email protected]> AuthorDate: Thu Oct 15 17:54:00 2020 +0900 .github/workflows/merge.yml: Publish docs post merge --- .github/workflows/ci.yml | 6 ++++- .github/workflows/merge.yml | 66 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a820522..b99b0ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,11 @@ name: PR Checks # request, and # 2. running on both pushes and pull requests results in the classic problem of # having double jobs. -on: push +on: + push: + branches-ignore: + - gh-pages + - master # Left to-do: # - coverage diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml new file mode 100644 index 0000000..11a1fbd --- /dev/null +++ b/.github/workflows/merge.yml @@ -0,0 +1,66 @@ +name: Merge actions + +env: + CI_IMAGE: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-debian:10-master-132813612 + BST_FORCE_SESSION_REBUILD: 1 + +on: + push: + branches: + - master + +jobs: + build: + name: Build documentation + runs-on: ubuntu-20.04 + steps: + - name: Checkout code + uses: actions/checkout@v2 + # BuildStream requires tags to be able to find its version. + with: + fetch-depth: 0 + + - name: Build documentation + run: | + docker run \ + --privileged \ + --device /dev/fuse \ + --env BST_FORCE_SESSION_REBUILD \ + --volume /home/runner/work:/__w \ + --workdir /__w/buildstream/buildstream \ + $CI_IMAGE \ + tox -e docs + tar -C doc/build/html -zcf docs.tgz . + + - name: Upload artifacts + uses: actions/upload-artifact@v2 + with: + name: docs + path: doc/build/html + + publish: + needs: build + runs-on: ubuntu-20.04 + steps: + + - name: Download artifact + uses: actions/download-artifact@v2 + with: + name: docs + path: docs + + - name: Checkout code + uses: actions/checkout@v2 + with: + ref: gh-pages + path: pages + + - name: Update repo + run: | + cp -a doc/* pages/ + cd pages/ + git add . + git config --local user.email "me+nightly-ci@pony" + git config --local user.name "Github Actions Nightly Job" + git commit -m "Update repo for docs build $GITHUB_RUN_NUMBER" + git push "https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY.git" gh-pages
