Add .gitea/workflows/smoke.yml
Some checks failed
Deploy (stellaamor) / deploy (push) Has been cancelled
Some checks failed
Deploy (stellaamor) / deploy (push) Has been cancelled
This commit is contained in:
42
.gitea/workflows/smoke.yml
Normal file
42
.gitea/workflows/smoke.yml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
name: Smoke (SSH + layout)
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches: [ "ci/smoke" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
smoke:
|
||||||
|
runs-on: [ self-hosted, mainhost, docker ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
APP_ROOT: /var/www/stellaamor
|
||||||
|
UPLOADS_DIR: uploads
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Write SSH key
|
||||||
|
run: |
|
||||||
|
umask 077
|
||||||
|
printf "%s" "${{ secrets.SSH_KEY }}" > ~/.ssh/id_ed25519
|
||||||
|
if [ -n "${{ secrets.SSH_KNOWN_HOSTS }}" ]; then
|
||||||
|
printf "%s\n" "${{ secrets.SSH_KNOWN_HOSTS }}" > ~/.ssh/known_hosts
|
||||||
|
else
|
||||||
|
echo "StrictHostKeyChecking no" >> ~/.ssh/config
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Ping server
|
||||||
|
run: ssh -i ~/.ssh/id_ed25519 ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} 'echo ok'
|
||||||
|
|
||||||
|
- name: Ensure layout (no deploy yet)
|
||||||
|
run: |
|
||||||
|
ssh -i ~/.ssh/id_ed25519 ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "
|
||||||
|
set -e
|
||||||
|
install -d -m 755 ${APP_ROOT}/releases ${APP_ROOT}/shared ${APP_ROOT}/shared/${UPLO
|
||||||
|
|
||||||
|
ADS_DIR}
|
||||||
|
echo smoke-$(date -u +%FT%TZ) > ${APP_ROOT}/shared/ci-smoke.txt
|
||||||
|
ls -la ${APP_ROOT} ${APP_ROOT}/shared
|
||||||
|
"
|
||||||
Reference in New Issue
Block a user