This is an automated email from the ASF dual-hosted git repository.
zregvart pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-website.git
The following commit(s) were added to refs/heads/master by this push:
new 7cf8531 chore(build): add build,preview and checks actions
7cf8531 is described below
commit 7cf85314cb09cf42812a086fd5c0a6163db2c61f
Author: Zoran Regvart <[email protected]>
AuthorDate: Fri Dec 18 22:21:13 2020 +0100
chore(build): add build,preview and checks actions
---
.github/workflows/pr.yaml | 51 ++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 48 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml
index e11c0f1..1d20922 100644
--- a/.github/workflows/pr.yaml
+++ b/.github/workflows/pr.yaml
@@ -15,14 +15,59 @@
# limitations under the License.
#
-name: Check Yarn cache
+name: Pull request checks and preview
-on: pull_request
+on: pull_request_target
jobs:
- check:
+ check-cache:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Run check
run: yarn workspaces foreach install --check-cache
+ build:
+ needs: check-cache
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Build
+ run: yarn build-all
+ - uses: actions/upload-artifact@v2
+ with:
+ name: website
+ path: public
+ env:
+ CAMEL_ENV: production
+ preview:
+ needs: build
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/download-artifact@v2
+ with:
+ name: website
+ path: public
+ - name: Preview on Netlify
+ uses: nwtgck/[email protected]
+ with:
+ publish-dir: 'preview'
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ deploy-message: ${{ github.event.number }} ${{
github.event.pull_request.title }}
+ alias: preview-${{ github.event.number }}
+ github-deployment-environment: preview
+ env:
+ NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
+ NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
+ checks:
+ needs: build
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/download-artifact@v2
+ with:
+ name: website
+ path: public
+ - name: Checks
+ run: yarn checks
+ env:
+ CAMEL_ENV: production