Merge pull request #9 from Lumos-Programming/shion/gha-checkout-name #2
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
name: Deploy to self-hosted runner | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: | |
- self-hosted | |
- Shion1305 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.21 | |
- name: Load credentials | |
run: "echo ${{ secrets.ENV_CONTENT }} > .env" | |
- name: kill previous process | |
run: "ps aux | grep 'lumos-discord-bot' | awk '{print $2}' | xargs kill -9" | |
- name: Go Build | |
run: go build -o lumos-discord-bot . | |
- name: Run the bot in the background | |
run: nohup ./lumos-discord-bot & |