26 lines
678 B
YAML
26 lines
678 B
YAML
name: Deploy documentation
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: oktpserver-deploy
|
|
steps:
|
|
- name: Fetch and deploy
|
|
env:
|
|
DEPLOY_SHA: ${{ gitea.sha }}
|
|
run: |
|
|
set -eu
|
|
checkout_dir=$(mktemp -d)
|
|
trap 'rm -rf -- "$checkout_dir"' EXIT
|
|
git clone --branch main --single-branch \
|
|
https://sulaco.nodered.ru:5333/COD2/OKTP_SERVER.git "$checkout_dir"
|
|
cd "$checkout_dir"
|
|
if [ "$(git rev-parse HEAD)" != "$DEPLOY_SHA" ]; then
|
|
echo "A newer commit exists; skipping this deployment."
|
|
exit 0
|
|
fi
|
|
bash scripts/deploy.sh
|