Private
Public Access
1
0
Files
MineSeeker/.gitea/workflows/deploy.yml
Lang f135746826
Some checks failed
Deploy to Production / deploy (push) Failing after 0s
chg: pkg: new version release !skipChangelog
2026-04-14 13:37:03 +02:00

40 lines
994 B
YAML

name: Deploy to Production
on:
push:
tags:
- 'v*'
jobs:
deploy:
runs-on: splendid-bear
steps:
- name: Checkout tag
env:
GITEA_TOKEN: ${{ gitea.token }}
run: |
set -e
export HOME=/tmp
git config --global --add safe.directory "${{ vars.PROD_APP_DIR }}"
cd "${{ vars.PROD_APP_DIR }}"
AUTHED=$(git remote get-url origin | sed "s|://|://oauth2:${GITEA_TOKEN}@|")
git remote set-url origin "$AUTHED"
git fetch --tags
git checkout "${{ gitea.ref_name }}"
- name: Write .env
env:
PROD_ENV_FILE: ${{ secrets.PROD_ENV_FILE }}
run: |
printf '%s' "$PROD_ENV_FILE" > "${{ vars.PROD_APP_DIR }}/.env"
- name: Build image
run: |
cd "${{ vars.PROD_APP_DIR }}"
docker compose build
- name: Start services
run: |
cd "${{ vars.PROD_APP_DIR }}"
docker compose up -d