Skip to content

4.22.7

4.22.7 #177

name: Dashboard Release
on:
push:
tags: [v*.*.*]
paths:
- "dashboard/**"
defaults:
run:
shell: bash
working-directory: dashboard/
jobs:
deploy:
name: Deploy dashboard
runs-on: ubuntu-latest
environment:
name: production
url: https://albion-killbot.com/
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: "npm"
cache-dependency-path: dashboard/
- name: Install dependencies
run: npm ci --workspaces=false
- name: Build for production
env:
REACT_APP_API_URL: ${{ vars.REACT_APP_API_URL }}
REACT_APP_DISCORD_CLIENT_ID: ${{ vars.REACT_APP_DISCORD_CLIENT_ID }}
REACT_APP_DISCORD_REDIRECT_URI: ${{ vars.REACT_APP_DISCORD_REDIRECT_URI }}
run: npm run build
- name: Sync files to production server
uses: burnett01/rsync-deployments@6.0.0
with:
switches: -avzr --delete
path: dashboard/build/
remote_host: ${{ vars.SSH_HOST_DASHBOARD }}
remote_user: ${{ vars.SSH_USER }}
remote_key: ${{ secrets.SSH_KEY }}
remote_path: www/