Skip to content

Commit

Permalink
Add GitHub Actions (#7)
Browse files Browse the repository at this point in the history
No binaries, only test build and deployment to https://explorer.photon-ai.com
  • Loading branch information
ksarink authored Mar 5, 2021
2 parents 0b75e70 + 0f88c50 commit 441f2b4
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js build and lint

on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]

jobs:
build_and_lint:

runs-on: ubuntu-18.04

strategy:
matrix:
node-version: [ 12.x ]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run lint
- run: npm run build --if-present
# - run: npm test
33 changes: 33 additions & 0 deletions .github/workflows/publish-https.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Node.js publish online @ explorer.photon-ai.com

on:
release:
types: [released]

jobs:
build_and_publish:

runs-on: ubuntu-18.04

strategy:
matrix:
node-version: [ 12.x ]

steps:
- uses: actions/checkout@v2
- name: Setup SSH Key
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add - <<< "${{ secrets.SSHKEY }}"
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- name: Upload dist folder
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: rsync -av --delete -e 'ssh -o StrictHostKeyChecking=no -o LogLevel=ERROR' ./dist/ "${{ secrets.SSHUSER }}"@"${{ secrets.SSHSERVER }}":/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# PHOTONAI Explorer
[![Build Status Travis](https://img.shields.io/travis/com/wwu-mmll/photonai_explorer/master)](https://travis-ci.com/github/wwu-mmll/photonai_explorer/branches)
[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/wwu-mmll/photonai_explorer/Node.js%20build%20and%20lint/master)](https://github.com/wwu-mmll/photonai_explorer/actions)
[![License: AGPLv3](https://img.shields.io/github/license/wwu-mmll/photonai_explorer)](https://github.com/wwu-mmll/photonai_explorer/blob/master/LICENSE)
[![GitHub Release](https://img.shields.io/github/release-date/wwu-mmll/photonai_explorer)](https://github.com/wwu-mmll/photonai_explorer/releases)
[![Twitter Follow](https://img.shields.io/twitter/follow/wwu_mmll?style=social)](https://twitter.com/intent/follow?screen_name=wwu_mmll)
Expand Down

0 comments on commit 441f2b4

Please sign in to comment.