so://phie

poppy

A feature-rich Minecraft plugin which enhances gaming experience
git clone git://soophie.de/poppy

blob: d631ebcc7448d7520260e539451f7ee69019ce8f (1341 bytes)[doc][blame][raw]

1name: Runner

2run-name: ${{ gitea.actor }} is building

3on: [push]

4

5jobs:

6 Build:

7 runs-on: ubuntu-latest

8 steps:

9 - name: Checkout

10 uses: actions/checkout@v3

11 - name: Setup Java

12 uses: actions/setup-java@v3

13 with:

14 distribution: 'adopt'

15 java-version: '20'

16 - name: Build Jar

17 run: ./build.sh

18 shell: bash

19 - name: Upload Artifacts

20 uses: actions/upload-artifact@v3

21 with:

22 name: poppy.zip

23 path: poppy.jar

24 - name: Configure SSH

25 run: |

26 mkdir -p ~/.ssh/

27 echo "$SSH_KEY" | tr -d '\r' > ~/.ssh/minecraft.key

28 chmod 600 ~/.ssh/minecraft.key

29 cat >>~/.ssh/config <<END

30 Host minecraft

31 HostName $SSH_HOST

32 Port $SSH_PORT

33 User $SSH_USER

34 IdentityFile ~/.ssh/minecraft.key

35 StrictHostKeyChecking no

36 END

37 cat ~/.ssh/config

38 env:

39 SSH_USER: ${{ secrets.SSH_USER }}

40 SSH_KEY: ${{ secrets.SSH_KEY }}

41 SSH_HOST: ${{ secrets.SSH_HOST }}

42 SSH_PORT: ${{ secrets.SSH_PORT }}

43 - name: Deploy Jar

44 run: |

45 scp poppy.jar minecraft:run/mc/plugins/

46 ssh minecraft 'cd run/mc/ && ./deploy.sh'