-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/Ottonien/ottonien-reformed
- Loading branch information
Showing
3 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Deploy | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install SSH Key | ||
uses: shimataro/ssh-key-action@v2 | ||
with: | ||
key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
known_hosts: 'just-a-placeholder-so-we-dont-get-errors' | ||
- name: Adding Known Hosts | ||
run: ssh-keyscan -p ${{ secrets.SSH_PORT }} -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts | ||
|
||
- name: Get code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Update version number | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install jq -y | ||
DESCRIPTION="\u00A78Ottonien.com Pack v$GITHUB_REF_NAME\n\u00A72Benötigt OptiFine \u00A76[MC 1.20.4]" | ||
jq --arg desc "$DESCRIPTION" '.pack.description = $desc' pack.mcmeta > pack.meta | ||
sed 's/\\\\/\\/g' pack.meta > pack.mcmeta | ||
rm pack.meta | ||
- name: Create zip file | ||
run: zip -r Ottonien.zip * | ||
|
||
- name: Authenticate GitHub CLI | ||
run: gh auth login --with-token <<< ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Get release tag | ||
id: get_tag | ||
run: echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | ||
|
||
- name: Upload resource pack | ||
run: gh release upload "$RELEASE_TAG" Ottonien.zip | ||
|
||
- name: Deploy to CDN | ||
run: | | ||
rsync -avzh -e "ssh -p ${{ secrets.SSH_PORT }}" Ottonien.zip ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:${{ secrets.DEPLOYMENT_PATH }}/Ottonien.zip | ||
rsync -avzh -e "ssh -p ${{ secrets.SSH_PORT }}" Ottonien.zip ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:${{ secrets.DEPLOYMENT_PATH }}/Ottonien.zip.new | ||
rsync -avzh -e "ssh -p ${{ secrets.SSH_PORT }}" Ottonien.zip ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:${{ secrets.DEPLOYMENT_PATH }}/resourcepack/Ottonien_Reformed_v$GITHUB_REF_NAME.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
# Mac specific ignores | ||
**/.DS_Store | ||
|
||
# IntelliJ files | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"pack": { | ||
"pack_format": 22, | ||
"description": "\u00A78Ottonien.com Serverpack\n\u00A72Benötigt Optifine \u00A76[MC 1.20.4]" | ||
"description": "\u00A78Ottonien.com Serverpack\n\u00A72Benötigt OptiFine \u00A76[MC 1.20.4]" | ||
} | ||
} |