Skip to content

📝 Added bs.vector:get_from_motion documentation #104

📝 Added bs.vector:get_from_motion documentation

📝 Added bs.vector:get_from_motion documentation #104

# This is a basic workflow to help you get started with Actions
name: Deploy on Minecraft server
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [master]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "deploy"
deploy:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 10
# Deploys to the server
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Test
run: |
echo $RELEASE_VERSION
echo ${{ env.RELEASE_VERSION }}
- name: deploy
uses: swznd/sftp-deploy@master
with:
host: ${{ secrets.SFTP_IP }}
port: ${{ secrets.SFTP_PORT }}
user: ${{ secrets.SFTP_SANDBOX_USER }}
password: ${{ secrets.SFTP_PASSWORD }}
remote_path: /Glib-Sandbox/
ignore: .github/**,.gitignore,**/.gitignore,**/.git/**, /advancements/, /data/, /DIM-1/, /DIM1/, /entities/, /generated/, /playerdata/, /poi/, /region/ /stats/, /level.dat, /level.dat_old, /session.lock, /uid.dat, /docs/, /generators/
- name: Restart server
env:
SERVER_RESTART_ENDPOINT: ${{ secrets.SERVER_RESTART_ENDPOINT }}
SERVER_RESTART_BEARER: ${{ secrets.SERVER_RESTART_BEARER }}
run: |
server_full_status=$(curl "$SERVER_RESTART_ENDPOINT/resources" -H 'Accept: application/json' -H 'Content-Type: application/json' -H "Authorization: Bearer $SERVER_RESTART_BEARER" -X GET)
server_power_status=$(jq -r '.attributes.current_state' <<<"$server_full_status")
if [ $server_power_status = 'running' ]; then
echo "Bookshelf's test server is online, restarting it to apply updates"
curl "$SERVER_RESTART_ENDPOINT/power" -H 'Accept: application/json' -H 'Content-Type: application/json' -H "Authorization: Bearer $SERVER_RESTART_BEARER" -X POST -d '{"signal": "restart"}'
else
echo "Bookshelf's test server is offline, it will not be started"
fi