Hide the "color to move" at the loading of the html page #41
This file contains 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
# This workflow will build a golang project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
name: Go | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.23.2' | |
- name: Build | |
run: | | |
mkdir -p ~/.ssh | |
touch ~/.ssh/id_rsa | |
chmod 600 ~/.ssh/id_rsa | |
echo "${{ secrets.PASSWORD }}" > ~/.ssh/id_rsa | |
ssh-keyscan -H ${{ secrets.HOST }} >> ~/.ssh/known_hosts | |
cd backend | |
echo "${{ secrets.MongoUrl }}" >> mongo/creds | |
go get . | |
go get github.com/ahmed-debbech/go_chess_puzzle/generator/config | |
go get github.com/ahmed-debbech/go_chess_puzzle/generator/data | |
go build -v . | |
ssh ${{ secrets.USERNAME }}@${{ secrets.HOST }} "kill -9 \$(cat ~/backend.pid)" || true | |
scp backend ${{ secrets.USERNAME }}@${{ secrets.HOST }}:/home/${{ secrets.USERNAME }} | |
continue-on-error: true | |
- name: Deploy | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USERNAME }} | |
key: ${{ secrets.PASSWORD }} | |
port: ${{ secrets.PORT }} | |
script: | | |
echo "On Server!" | |
rm nohup.out | |
nohup ./backend >> ss 2>&1 < /dev/null & echo $! > backend.pid; disown | |
echo "Backend process started in the background. Exiting SSH session..." |