You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/04/10 05:33:44 UTC

[incubator-nuttx-website] branch master updated: Only publish site on push to master. Build for all PR

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 6aff6e1  Only publish site on push to master.  Build for all PR
6aff6e1 is described below

commit 6aff6e1677556f781affd65e2126d480803e5892
Author: Brennan Ashton <ba...@brennanashton.com>
AuthorDate: Thu Apr 9 20:19:32 2020 -0700

    Only publish site on push to master.  Build for all PR
    
    Signed-off-by: Brennan Ashton <ba...@brennanashton.com>
---
 .github/workflows/main.yml | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 9660766..e113375 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -2,24 +2,23 @@ name: CI
 
 on:
   pull_request:
-    branches: [ master ]
-    types: [closed]
+  push:
+    branches:
+      - master
 
 jobs:
   build:
     runs-on: ubuntu-latest
-
-    if: github.event.pull_request.merged == true
     steps:
     - uses: actions/checkout@v2
     - run: |
         git fetch --prune --unshallow
 
-    - name: Intall tools
+    - name: Install tools
       run: |
         sudo apt-get -y install rubygems ruby-dev zlib1g-dev
 
-    - name: Run publish.sh
+    - name: Build Site
       run: |
         export GEM_HOME=$HOME/.gem
         export PATH=$PATH:$GEM_HOME/bin
@@ -28,4 +27,8 @@ jobs:
         git config --global user.name $username
         git config --global user.email $email
         ./publish.sh
+
+    - name: Publish Site
+      if: github.event_name == 'push' && github.ref == 'refs/heads/master'
+      run: |
         git push origin asf-site:asf-site