Skip to content

- ennemy hp/sound/death #28

- ennemy hp/sound/death

- ennemy hp/sound/death #28

name: Deploy
on:
push:
branches:
- master
workflow_dispatch:
jobs:
deploy:
name: deploy
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x]
steps:
- name: Deploying to Edmund
uses: appleboy/ssh-action@master #an action made to control linux servers
with: #setting secrets
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
set -e # Exit on error
cd ${{ secrets.WORK_DIR }}
# Set up Git to use the Personal Access Token
git config --global user.name "GitHub Actions Bot"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git remote set-url origin https://x-access-token:${{ secrets.ACCESS_TOKEN_TO_GIT }}@github.com/${{ github.repository }}.git
# Pull changes
git checkout ${{ vars.MAIN_BRANCH }}
git reset --hard HEAD
git pull
# Install dependencies and build the project
npm install
npm run build
exit