Skip to content

Deploy to Development Server #15

Deploy to Development Server

Deploy to Development Server #15

name: Deploy to Development Server
on:
workflow_dispatch:
jobs:
check_linting:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version: "latest"
- name: Install pnpm
uses: pnpm/[email protected]
with:
version: "latest"
- name: Install dependencies
run: pnpm i
- name: Lint code
run: pnpm format:check
deploy:
needs: check_linting
runs-on: ubuntu-latest
steps:
- name: Deploy to development server
uses: appleboy/[email protected]
with:
host: ${{ secrets.DEV_SERVER_HOST }}
username: ${{ secrets.DEV_SERVER_USERNAME }}
password: ${{ secrets.DEV_SERVER_PASSWORD }}
port: ${{ secrets.DEV_SERVER_PORT }}
script: |
cd Stuns-Aterbrukslabbet/
git checkout Main
git fetch origin Main
git reset --hard origin/Main
pnpm prod:build
sudo shutdown -r +1 "Rebooting in 1 minute"