Files
poweronoff.click/.gitea/workflows/build.yml
T
Stan Nowogrudski f8f6e63071
Build and deploy the poweronoff.click hugo / build (pull_request) Canceled after 0s
Migrate build workflow from Drone to Gitea Actions
2026-10-13 19:07:55 +02:00

49 lines
1.2 KiB
YAML

name: Build and deploy the poweronoff.click hugo
on:
push:
branches:
- master
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: "0.87.0"
- name: Build
run: hugo
- name: Deploy
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: appleboy/scp-action@v0.1.7
with:
host: poweronoff.click
username: ${{ secrets.SSH_USERNAME }}
password: ${{ secrets.SSH_PASSWORD }}
port: ${{ secrets.SSH_PORT }}
source: "public/*"
target: /var/www/poweronoff.click
rm: false
strip_components: 1
- name: Send Telegram notification
if: always()
uses: appleboy/telegram-action@v0.1.1
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: |
${{ github.repository }} — ${{ job.status }}
Commit: ${{ github.event.head_commit.message }}
${{ github.event.head_commit.url }}