chore: switch from Drone to Gitea Actions
All checks were successful
deploy / deploy (push) Successful in 2m8s
All checks were successful
deploy / deploy (push) Successful in 2m8s
This commit is contained in:
parent
cf1147204c
commit
4b447369c2
178
.drone.yml
178
.drone.yml
@ -1,178 +0,0 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: CD
|
||||
|
||||
steps:
|
||||
- name: restore cache node
|
||||
image: drillster/drone-volume-cache
|
||||
volumes:
|
||||
- name: main-website-node
|
||||
path: /cache/phundrak.com/node
|
||||
settings:
|
||||
restore: true
|
||||
mount:
|
||||
- ./node_modules
|
||||
|
||||
- name: restore cache emacs
|
||||
image: drillster/drone-volume-cache
|
||||
volumes:
|
||||
- name: main-website-emacs
|
||||
path: /cache/phundrak.com/emacs
|
||||
settings:
|
||||
restore: true
|
||||
mount:
|
||||
- /var/emacs
|
||||
|
||||
- name: generate emacs
|
||||
image: silex/emacs:master-alpine
|
||||
commands:
|
||||
- mkdir -p /var/emacs
|
||||
- apk update && apk add git
|
||||
- emacs --init-directory=/var/emacs --script export.el
|
||||
depends_on:
|
||||
- "restore cache emacs"
|
||||
|
||||
- name: generate node
|
||||
image: node:19-alpine
|
||||
commands:
|
||||
- yarn install
|
||||
- yarn build
|
||||
depends_on:
|
||||
- "restore cache node"
|
||||
- "generate emacs"
|
||||
|
||||
- name: rebuild cache emacs
|
||||
image: drillster/drone-volume-cache
|
||||
volumes:
|
||||
- name: conlang-emacs
|
||||
path: /cache/conlang/emacs
|
||||
settings:
|
||||
rebuild: true
|
||||
mount:
|
||||
- /var/emacs
|
||||
depends_on:
|
||||
- "generate emacs"
|
||||
|
||||
- name: rebuild cache node
|
||||
image: drillster/drone-volume-cache
|
||||
volumes:
|
||||
- name: main-website-node
|
||||
path: /cache/phundrak.com/node
|
||||
settings:
|
||||
rebuild: true
|
||||
mount:
|
||||
- ./node_modules
|
||||
depends_on:
|
||||
- "generate node"
|
||||
|
||||
- name: deploy web stable
|
||||
image: appleboy/drone-scp
|
||||
settings:
|
||||
host:
|
||||
from_secret: ssh_host
|
||||
target:
|
||||
from_secret: ssh_target
|
||||
source: content/.vuepress/dist/*
|
||||
strip_components: 3
|
||||
username:
|
||||
from_secret: ssh_username
|
||||
password:
|
||||
from_secret: ssh_password
|
||||
port:
|
||||
from_secret: ssh_port
|
||||
depends_on:
|
||||
- "generate node"
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
||||
|
||||
- name: deploy gemini
|
||||
image: appleboy/drone-scp
|
||||
settings:
|
||||
host:
|
||||
from_secret: ssh_host
|
||||
target:
|
||||
from_secret: ssh_target_gemini
|
||||
source: gemini/*
|
||||
strip_components: 1
|
||||
username:
|
||||
from_secret: ssh_username
|
||||
password:
|
||||
from_secret: ssh_password
|
||||
port:
|
||||
from_secret: ssh_port
|
||||
depends_on:
|
||||
- "generate emacs"
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
||||
|
||||
- name: purge cache stable
|
||||
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://beta.phundrak.com
|
||||
depends_on:
|
||||
- "deploy web stable"
|
||||
- "deploy gemini"
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
||||
|
||||
- name: deploy web devel
|
||||
image: appleboy/drone-scp
|
||||
settings:
|
||||
host:
|
||||
from_secret: ssh_host
|
||||
target:
|
||||
from_secret: ssh_target_devel
|
||||
source: content/.vuepress/dist/*
|
||||
strip_components: 3
|
||||
username:
|
||||
from_secret: ssh_username
|
||||
password:
|
||||
from_secret: ssh_password
|
||||
port:
|
||||
from_secret: ssh_port
|
||||
depends_on:
|
||||
- "generate node"
|
||||
when:
|
||||
branch:
|
||||
- devel
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
||||
|
||||
- name: purge cache devel
|
||||
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://alpha.phundrak.com
|
||||
depends_on:
|
||||
- "deploy web devel"
|
||||
when:
|
||||
branch:
|
||||
- devel
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
42
.gitea/workflows/deploy.yaml
Normal file
42
.gitea/workflows/deploy.yaml
Normal file
@ -0,0 +1,42 @@
|
||||
name: deploy
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18.x
|
||||
- run: corepack enable
|
||||
- run: yarn install --frozen-lockfile
|
||||
- uses: purcell/setup-emacs@master
|
||||
with:
|
||||
version: 29.1
|
||||
- name: "Export org to md"
|
||||
run: emacs -Q --script export.el
|
||||
- run: yarn build
|
||||
- name: "Deploy on the Web"
|
||||
uses: appleboy/scp-action@v0.1.7
|
||||
with:
|
||||
host: ${{ secrets.HOST }}
|
||||
username: ${{ secrets.USERNAME }}
|
||||
key: ${{ secrets.KEY }}
|
||||
port: ${{ secrets.PORT }}
|
||||
source: content/.vuepress/dist/*
|
||||
target: ${{ secrets.DESTPATH }}
|
||||
strip_components: 3
|
||||
- name: "Deploy on Gemini"
|
||||
uses: appleboy/scp-action@v0.1.7
|
||||
with:
|
||||
host: ${{ secrets.HOST }}
|
||||
username: ${{ secrets.USERNAME }}
|
||||
key: ${{ secrets.KEY }}
|
||||
port: ${{ secrets.PORT }}
|
||||
source: gemini/*
|
||||
target: ${{ secrets.DESTPATH_GMI }}
|
||||
strip_components: 1
|
Loading…
Reference in New Issue
Block a user