Skip to content

Algebra Integral Dev Deploy #50

Algebra Integral Dev Deploy

Algebra Integral Dev Deploy #50

Workflow file for this run

name: Algebra Integral Dev Deploy
on:
workflow_dispatch:
inputs:
target:
description: 'Environment'
required: true
default: 'dev'
type: choice
options:
- dev
jobs:
deploy:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set dev target path
if: ${{ inputs.target == 'dev' }}
run: |
echo "TARGET_PATH=${{ secrets.DEV_DEPLOYMENT_PATH }}" >> $GITHUB_ENV
- name: Set up node
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build
run: CI=false yarn build
#setup key
- run: set -eu
- run: mkdir "$HOME/.ssh"
- run: echo "${{ secrets.SHHKEYM }}" > "$HOME/.ssh/SHHKEYM"
- run: chmod 600 "$HOME/.ssh/SHHKEYM"
#deploy
- run: cd dist && rsync -e "ssh -i $HOME/.ssh/SHHKEYM -o StrictHostKeyChecking=no" -a --compress --delete . ${{ env.TARGET_PATH }}