NEWS: Welcome to my new homepage! <3

build.yaml - poppy - A feature-rich Minecraft plugin which enhances gaming experience

poppy

A feature-rich Minecraft plugin which enhances gaming experience
git clone git://192.168.2.2/poppy
Log | Files | Refs | README

build.yaml (1367B)


      1 name: Runner
      2 run-name: ${{ gitea.actor }} is building
      3 
      4 on:
      5   push:
      6     branches: [main]
      7 
      8 jobs:
      9   Build:
     10     runs-on: ubuntu-latest
     11     steps:
     12       - name: Checkout
     13         uses: actions/checkout@v3
     14       - name: Setup Java
     15         uses: actions/setup-java@v3
     16         with:
     17             distribution: 'adopt'
     18             java-version: '20'
     19       - name: Build Jar
     20         run: ./build.sh
     21         shell: bash
     22       - name: Upload Artifacts
     23         uses: actions/upload-artifact@v3
     24         with:
     25           name: poppy.zip
     26           path: poppy.jar
     27       - name: Configure SSH
     28         run: |
     29           mkdir -p ~/.ssh/
     30           echo "$SSH_KEY" | tr -d '\r' > ~/.ssh/minecraft.key
     31           chmod 600 ~/.ssh/minecraft.key
     32           cat >>~/.ssh/config <<END
     33           Host minecraft
     34             HostName $SSH_HOST
     35             Port $SSH_PORT
     36             User $SSH_USER
     37             IdentityFile ~/.ssh/minecraft.key
     38             StrictHostKeyChecking no
     39           END
     40           cat ~/.ssh/config
     41         env:
     42           SSH_USER: ${{ secrets.SSH_USER }}
     43           SSH_KEY: ${{ secrets.SSH_KEY }}
     44           SSH_HOST: ${{ secrets.SSH_HOST }}
     45           SSH_PORT: ${{ secrets.SSH_PORT }}
     46       - name: Deploy Jar
     47         run: |
     48           scp poppy.jar minecraft:run/mc/plugins/
     49           ssh minecraft 'cd run/mc/ && ./deploy.sh'