mirror of
https://github.com/Faithful-Resource-Pack/Faithful-32x-Java.git
synced 2026-04-17 08:46:58 -04:00
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)
This commit is contained in:
23
.github/workflows/create-pack.yml
vendored
Normal file
23
.github/workflows/create-pack.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
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"
|
||||
Reference in New Issue
Block a user