Files
TeleSec/.gitea/workflows/static.yml
naielv 8ee724ba14 fix
2025-07-15 14:12:58 +02:00

47 lines
1.7 KiB
YAML

name: Build server
on:
push:
tags: ["v*-*-*_*"]
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
token: '${{ secrets.TOKEN_PULL }}'
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- uses: actions/setup-go@v5
with:
go-version: '^1.13.1'
- name: "Build app"
run: "python3 build.py"
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
# Upload built files
name: 'TeleSec-dist'
path: ./dist
- uses: mdallasanta/ssh-scp-deploy@v1.2.0
with:
local: './dist/' # Local file path - REQUIRED false - DEFAULT ./
remote: '${{ secrets.FOLDER }}' # Remote file path - REQUIRED false - DEFAULT ~/
host: ${{secrets.HOST}} # Remote server address - REQUIRED true
port: 22 # Remote server port - REQUIRED false - DEFAULT 22
user: ${{secrets.USER}} # Remote server user - REQUIRED true
key: ${{secrets.KEY}} # Remote server private key - REQUIRED at least one of "password" or "key"
- name: "zip-it-up"
run: "zip -r TeleSec-dist.zip ./dist"
- name: Upload as release
uses: https://gitea.com/actions/release-action@main
with:
files: |-
TeleSec-dist.zip
api_key: '${{secrets.TOKEN_PUSH_PLUS}}'