Skip to content

Commit 6785fe0

Browse files
committed
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)
1 parent b5ca564 commit 6785fe0

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

.github/workflows/create-pack.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Create Pack
2+
on:
3+
push:
4+
branches:
5+
- '**'
6+
- '!main'
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Create Pack
12+
uses: appleboy/ssh-action@v1.0.3
13+
with:
14+
host: ${{ secrets.HOST }}
15+
USERNAME: ${{ secrets.USERNAME }}
16+
PORT: ${{ secrets.PORT }}
17+
KEY: ${{ secrets.SSH }}
18+
script: |
19+
[ ! -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 }}"
20+
cd "./packs/Faithful-Java-32x/${{ github.ref_name }}"
21+
git pull
22+
zip -r "Faithful 32x - ${{ github.ref_name }} Experimental.zip" . -x "*.git*" -x "*.github*" -x ".gitignore"
23+
mv "Faithful 32x - ${{ github.ref_name }} Experimental.zip" "/var/www/html/database.faithfulpack.net/packs/32x-Java/Experimental"

0 commit comments

Comments
 (0)