Skip to content

Commit 3def82e

Browse files
committed
add automated pack creation
1 parent aff760d commit 3def82e

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

.github/workflows/create-pack.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Create Pack
2-
on: [push]
2+
on:
3+
push:
4+
branches-ignore:
5+
- master
6+
- main
37
jobs:
48
build:
59
runs-on: ubuntu-latest
@@ -10,12 +14,17 @@ jobs:
1014
id: branch-name
1115
uses: tj-actions/branch-names@v5.2
1216

13-
- name: Creating Pack
17+
- name: Create Pack
1418
uses: appleboy/ssh-action@master
1519
with:
1620
host: ${{ secrets.HOST }}
1721
USERNAME: ${{ secrets.USERNAME }}
1822
PORT: ${{ secrets.PORT }}
1923
KEY: ${{ secrets.SSH }}
2024
script: |
21-
echo "asdf ${{ steps.branch-name.outputs.current_branch }} hhhhhhh"
25+
cd "./packs/Faithful-Java-32x"
26+
git pull
27+
git checkout ${{ steps.branch-name.outputs.current_branch }}
28+
zip -r Faithful-Java-32x-Nightly.zip . -x "*.git*" -x ".gitignore"
29+
[ ! -d "/var/www/html/database.faithfulpack.net/packs/32x-Java/${{ steps.branch-name.outputs.current_branch }}" ] && mkdir "/var/www/html/database.faithfulpack.net/packs/32x-Java/${{ steps.branch-name.outputs.current_branch }}"
30+
mv Faithful-Java-32x-Nightly.zip "/var/www/html/database.faithfulpack.net/packs/32x-Java/${{ steps.branch-name.outputs.current_branch }}"

0 commit comments

Comments
 (0)