Migrate build workflow from Drone to Gitea Actions
Build and deploy the poweronoff.click hugo / build (pull_request) Canceled after 0s
Build and deploy the poweronoff.click hugo / build (pull_request) Canceled after 0s
This commit is contained in:
1 parent
fff8bd9754
commit
f8f6e63071
2 files changed
+48
-52
No files matched your search
-52
@@ -1,52 +0,0 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: build and deploy the poweronoff.click hugo
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
steps:
|
||||
- name: clone
|
||||
image: plugins/git
|
||||
recursive: true
|
||||
|
||||
- name: build
|
||||
image: plugins/hugo
|
||||
settings:
|
||||
hugo_version: 0.87.0
|
||||
validate: true
|
||||
buildDrafts: false
|
||||
buildExpired: false
|
||||
buildFuture: false
|
||||
|
||||
- name: deploy
|
||||
image: appleboy/drone-scp:1.6.4
|
||||
settings:
|
||||
host: poweronoff.click
|
||||
target: /var/www/poweronoff.click
|
||||
source: public/*
|
||||
rm: false
|
||||
strip_components: 1
|
||||
username:
|
||||
from_secret: ssh_username
|
||||
password:
|
||||
from_secret: ssh_password
|
||||
port:
|
||||
from_secret: ssh_port
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
||||
|
||||
- name: "send telegram notification"
|
||||
image: appleboy/drone-telegram
|
||||
settings:
|
||||
to:
|
||||
from_secret: telegram_to
|
||||
token:
|
||||
from_secret: telegram_token
|
||||
@@ -0,0 +1,48 @@
|
||||
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 }}
|
||||
Reference in new issue
Block a user