64 lines
2.2 KiB
YAML
64 lines
2.2 KiB
YAML
name: CI for Network Explorer
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'explorer/**'
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: explorer
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: custom-runner-linux
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Install rsync
|
|
run: sudo apt-get install rsync
|
|
- uses: rlespinasse/github-slug-action@v3.x
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: '16'
|
|
- name: Setup yarn
|
|
run: npm install -g yarn
|
|
continue-on-error: true
|
|
- name: Build shared packages
|
|
run: cd .. && yarn && yarn build
|
|
- name: Set environment from the example
|
|
run: cp .env.prod .env
|
|
# - run: yarn test
|
|
# continue-on-error: true
|
|
- run: yarn && yarn build
|
|
continue-on-error: true
|
|
- name: Deploy branch to CI www
|
|
continue-on-error: true
|
|
uses: easingthemes/ssh-deploy@main
|
|
env:
|
|
SSH_PRIVATE_KEY: ${{ secrets.CI_WWW_SSH_PRIVATE_KEY }}
|
|
ARGS: "-rltgoDzvO --delete"
|
|
SOURCE: "explorer/dist/"
|
|
REMOTE_HOST: ${{ secrets.CI_WWW_REMOTE_HOST }}
|
|
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }}
|
|
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/network-explorer-${{ env.GITHUB_REF_SLUG }}
|
|
EXCLUDE: "/dist/, /node_modules/"
|
|
- name: Keybase - Node Install
|
|
run: npm install
|
|
working-directory: .github/workflows/support-files
|
|
- name: Keybase - Send Notification
|
|
env:
|
|
NYM_NOTIFICATION_KIND: network-explorer
|
|
NYM_PROJECT_NAME: "Network Explorer"
|
|
NYM_CI_WWW_BASE: "${{ secrets.NYM_CI_WWW_BASE }}"
|
|
NYM_CI_WWW_LOCATION: "network-explorer-${{ env.GITHUB_REF_SLUG }}"
|
|
GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}"
|
|
GIT_BRANCH: "${GITHUB_REF##*/}"
|
|
KEYBASE_NYMBOT_USERNAME: "${{ secrets.KEYBASE_NYMBOT_USERNAME }}"
|
|
KEYBASE_NYMBOT_PAPERKEY: "${{ secrets.KEYBASE_NYMBOT_PAPERKEY }}"
|
|
KEYBASE_NYMBOT_TEAM: "${{ secrets.KEYBASE_NYMBOT_TEAM }}"
|
|
KEYBASE_NYM_CHANNEL: "ci-network-explorer"
|
|
IS_SUCCESS: "${{ job.status == 'success' }}"
|
|
uses: docker://keybaseio/client:stable-node
|
|
with:
|
|
args: .github/workflows/support-files/notifications/entry_point.sh
|