Skip to content

Deploy to server

Deploy to server #56

Workflow file for this run

# Simple workflow for deploying static content to server
name: Deploy to server
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: read
# Allow one concurrent deployment
concurrency:
group: 'deploy'
cancel-in-progress: true
jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: Server
url: ${{ vars.PUBLIC_URL }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: 16.x
# cache: 'yarn'
- name: Install dependencies
run: yarn
- name: Build
run: |
export PUBLIC_URL=${{ vars.PUBLIC_URL }}
yarn build
- name: Change permission
run: |
chmod 775 -R build
- name: Deploy
uses: easingthemes/ssh-deploy@main
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
ARGS: '-rlgoDzvc -i --delete -p --no-group'
SOURCE: 'build/'
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
SSH_CMD_ARGS: '-o StrictHostKeyChecking=no -o ServerAliveInterval=3 -o ProxyJump=${{ secrets.RAS_HOST }}'
TARGET: ${{ secrets.REMOTE_TARGET }}