2020-12-28 11:54:51 +00:00
|
|
|
kind: pipeline
|
|
|
|
name: update_website
|
2022-01-14 15:02:44 +00:00
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- main
|
2020-12-28 13:24:52 +00:00
|
|
|
steps:
|
2022-01-02 16:39:36 +00:00
|
|
|
- name: fetch_webmentions
|
|
|
|
image: python:3.7
|
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- main
|
|
|
|
commands:
|
|
|
|
- pip install poetry
|
2022-01-02 16:42:27 +00:00
|
|
|
- cd bstools
|
2022-01-02 16:45:09 +00:00
|
|
|
- poetry build
|
|
|
|
- pip install ./dist/bstools*.whl
|
|
|
|
- cd ../
|
|
|
|
- python -m bstools fetch-mentions --mentions-file ./brainsteam/data/mentions.json
|
2022-01-02 16:49:05 +00:00
|
|
|
environment:
|
|
|
|
WEBMENTIONSIO_API_KEY:
|
|
|
|
from_secret: WEBMENTIONSIO_API_KEY
|
2022-01-02 16:39:36 +00:00
|
|
|
|
|
|
|
- name: store_webmentions
|
|
|
|
image: appleboy/drone-git-push
|
2022-01-14 15:02:44 +00:00
|
|
|
|
2022-01-02 16:39:36 +00:00
|
|
|
settings:
|
|
|
|
remote_name: origin
|
|
|
|
branch: main
|
|
|
|
local_ref: main
|
|
|
|
commit: true
|
|
|
|
commit_message: Commit latest webmentions
|
|
|
|
author_name: DroneCI
|
2022-01-02 16:42:27 +00:00
|
|
|
|
2020-12-28 13:22:03 +00:00
|
|
|
- name: hugo_build
|
2020-12-28 11:54:51 +00:00
|
|
|
image: alombarte/hugo
|
2021-01-14 11:54:20 +00:00
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- main
|
2020-12-28 11:54:51 +00:00
|
|
|
commands:
|
2020-12-28 11:56:31 +00:00
|
|
|
- git submodule init
|
2020-12-28 11:57:19 +00:00
|
|
|
- git submodule update
|
2020-12-28 11:55:42 +00:00
|
|
|
- cd brainsteam
|
2020-12-28 12:09:39 +00:00
|
|
|
- hugo
|
2021-12-21 14:30:28 +00:00
|
|
|
# - cd ../
|
|
|
|
# - git fetch origin public && git checkout public
|
|
|
|
# - cp -r brainsteam/public new_files
|
|
|
|
# - rm -rf brainsteam/
|
|
|
|
# - cp -Tr new_files/ ./
|
|
|
|
# - rm -rf new_files/
|
2020-12-28 13:22:03 +00:00
|
|
|
- name: hugo_publish
|
2021-12-21 14:30:28 +00:00
|
|
|
image: alpine:3.12.3
|
2021-12-21 12:21:34 +00:00
|
|
|
image: appleboy/drone-git-push
|
2021-12-21 14:30:28 +00:00
|
|
|
# settings:
|
|
|
|
# remote_name: origin
|
|
|
|
# branch: public
|
|
|
|
# local_ref: public
|
|
|
|
# commit: true
|
|
|
|
# commit_message: update build from hugo
|
|
|
|
# author_name: DroneCI
|
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- main
|
|
|
|
environment:
|
|
|
|
INPUT_HASHFILE: hashes.sha256
|
|
|
|
INPUT_HASHTYPE: sha256
|
|
|
|
INPUT_PROTOCOL: ftp
|
|
|
|
INPUT_HOST: sv7.byethost7.org
|
2021-12-21 14:33:45 +00:00
|
|
|
INPUT_DESTINATION: /
|
2021-12-21 14:30:28 +00:00
|
|
|
INPUT_SOURCE: brainsteam/public
|
|
|
|
INPUT_USERNAME:
|
|
|
|
from_secret: FTP_USERNAME
|
|
|
|
INPUT_PASSWORD:
|
|
|
|
from_secret: FTP_PASSWORD
|
|
|
|
FTP_HOSTNAME: sv7.byethost7.org
|
|
|
|
commands:
|
|
|
|
- apk add lftp
|
|
|
|
# - cd brainsteam
|
|
|
|
# - lftp -e "mirror -R ./public /" -u $FTP_USERNAME,$FTP_PASSWORD $FTP_HOSTNAME
|
2021-12-25 11:09:34 +00:00
|
|
|
- sh sync.sh
|
2021-12-25 11:17:42 +00:00
|
|
|
# - name: webmention_check
|
|
|
|
# image: 3apaxicom/npx
|
|
|
|
# when:
|
|
|
|
# branch:
|
|
|
|
# - main
|
|
|
|
# commands:
|
|
|
|
# - npx webmention https://brainsteam.co.uk/index.xml --limit 1 --send
|