Files
Faithful-32x-Java/.github/workflows/create-pack.yml
Robert 6785fe05fa improve create pack action
- automatically downloiads branch to server when it doesn't exist
- use more variables instead of hardcoded values
- simplified some things
- should run on all branches (hopefully not at once)
2024-06-23 11:41:26 +02:00

23 lines
960 B
YAML

name: Create Pack
on:
push:
branches:
- '**'
- '!main'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Create Pack
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.HOST }}
USERNAME: ${{ secrets.USERNAME }}
PORT: ${{ secrets.PORT }}
KEY: ${{ secrets.SSH }}
script: |
[ ! -d "./packs/${{ github.event.repository.name }}/${{ github.ref_name }}" ] && git clone "https://github.com/${{ github.repository }}" -b ${{ github.ref_name }} --single-branch "./packs/${{ github.event.repository.name }}/${{ github.ref_name }}"
cd "./packs/Faithful-Java-32x/${{ github.ref_name }}"
git pull
zip -r "Faithful 32x - ${{ github.ref_name }} Experimental.zip" . -x "*.git*" -x "*.github*" -x ".gitignore"
mv "Faithful 32x - ${{ github.ref_name }} Experimental.zip" "/var/www/html/database.faithfulpack.net/packs/32x-Java/Experimental"