- better ennemy attack handling #37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |