feat: add CI with Gitea actions
This commit is contained in:
parent
244adf1972
commit
4382df6df6
60
.drone.yml
60
.drone.yml
@ -1,60 +0,0 @@
|
|||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: CD
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: generate emacs
|
|
||||||
image: silex/emacs:master-alpine
|
|
||||||
commands:
|
|
||||||
- apk update && apk add git
|
|
||||||
- emacs -Q --script export.el
|
|
||||||
- pwd && ls -ahl
|
|
||||||
- find / -name '*.org'
|
|
||||||
- find / -name '*.md'
|
|
||||||
|
|
||||||
- name: generate node
|
|
||||||
image: node:19-alpine
|
|
||||||
commands:
|
|
||||||
- yarn --frozen-lockfile
|
|
||||||
- yarn docs:build
|
|
||||||
- pwd && ls -ahl
|
|
||||||
|
|
||||||
- name: deploy
|
|
||||||
image: appleboy/drone-scp
|
|
||||||
settings:
|
|
||||||
host:
|
|
||||||
from_secret: ssh_host
|
|
||||||
target:
|
|
||||||
from_secret: ssh_target
|
|
||||||
source: docs/.vuepress/dist/*
|
|
||||||
strip_components: 3
|
|
||||||
username:
|
|
||||||
from_secret: ssh_username
|
|
||||||
password:
|
|
||||||
from_secret: ssh_password
|
|
||||||
port:
|
|
||||||
from_secret: ssh_port
|
|
||||||
when:
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
event:
|
|
||||||
exclude:
|
|
||||||
- pull_request
|
|
||||||
|
|
||||||
- name: purge cache
|
|
||||||
image: jetrails/drone-cloudflare-caching
|
|
||||||
settings:
|
|
||||||
api_token:
|
|
||||||
from_secret: cloudflare_cache_api
|
|
||||||
zone_identifier:
|
|
||||||
from_secret: phundrak_com_zone_id
|
|
||||||
action: purge_files
|
|
||||||
list:
|
|
||||||
- https://config.phundrak.com
|
|
||||||
when:
|
|
||||||
branch:
|
|
||||||
- devel
|
|
||||||
event:
|
|
||||||
exclude:
|
|
||||||
- pull_request
|
|
35
.gitea/workflows/deploy.yaml
Normal file
35
.gitea/workflows/deploy.yaml
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
name: deploy
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: purcell/setup-emacs@master
|
||||||
|
with:
|
||||||
|
version: 29.1
|
||||||
|
- name: "Export org to md"
|
||||||
|
run: emacs -Q --script export.el
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 18.x
|
||||||
|
- uses: borales/actions-yarn@v4.2.0
|
||||||
|
with:
|
||||||
|
cmd: install --frozen-lockfile
|
||||||
|
- uses: borales/actions-yarn@v4.2.0
|
||||||
|
with:
|
||||||
|
cmd: docs:build
|
||||||
|
- name: "Deploy to remote server"
|
||||||
|
uses: appleboy/scp-action@v0.1.4
|
||||||
|
with:
|
||||||
|
host: ${{ secrets.HOST }}
|
||||||
|
username: ${{ secrets.USERNAME }}
|
||||||
|
key: ${{ secrets.KEY }}
|
||||||
|
port: ${{ secrets.PORT }}
|
||||||
|
source: docs/.vuepress/dist/*
|
||||||
|
target: ${{ secrets.DESTPATH }}
|
||||||
|
strip_components: 3
|
Loading…
Reference in New Issue
Block a user