Merge branch 'main' of ssh://git.jamesravey.me:222/ravenscroftj/brainsteam.co.uk into main

This commit is contained in:
James Ravenscroft 2022-10-22 15:55:50 +00:00
commit c1e3cb62b5
1 changed files with 83 additions and 84 deletions

View File

@ -2,93 +2,92 @@ kind: pipeline
name: update_website name: update_website
steps: steps:
- name: fetch_webmentions - name: fetch_webmentions
image: python:3.7 image: python:3.7
when: when:
branch:
- main
commands:
- pip install poetry
- cd bstools
- poetry build
- pip install ./dist/bstools*.whl
- cd ../
- python -m bstools fetch-mentions --mentions-file ./brainsteam/data/mentions.json
- mkdir -p $HOME/.ssh
- echo "$SSH_KEY" > $HOME/.ssh/id_rsa
- chmod 600 $HOME/.ssh/id_rsa
- (git commit -a -m "Updating latest webmentions" && git push --set-upstream origin main) || exit 0
environment:
WEBMENTIONSIO_API_KEY:
from_secret: WEBMENTIONSIO_API_KEY
SSH_KEY:
from_secret:gitea_ssh_key
# - name: store_webmentions
# image: appleboy/drone-git-push
# when:
# branch:
# - main
# settings:
# remote_name: origin
# branch: main
# local_ref: main
# commit: true
# commit_message: Commit latest webmentions
# author_name: DroneCI
# ssh_key:
# from_secret: gitea_ssh_key
- name: hugo_build
image: alombarte/hugo
when:
branch: branch:
- main - main
commands: commands:
- git submodule init - pip install poetry
- git submodule update - cd bstools
- cd brainsteam - poetry build
- hugo - pip install ./dist/bstools*.whl
# - cd ../ - cd ../
# - git fetch origin public && git checkout public - python -m bstools fetch-mentions --mentions-file ./brainsteam/data/mentions.json
# - cp -r brainsteam/public new_files - mkdir -p $HOME/.ssh
# - rm -rf brainsteam/ - echo "$SSH_KEY" > $HOME/.ssh/id_rsa
# - cp -Tr new_files/ ./ - chmod 600 $HOME/.ssh/id_rsa
# - rm -rf new_files/ - (git commit -a -m "Updating latest webmentions" && git push --set-upstream origin main) || exit 0
- name: hugo_publish environment:
image: alpine:3.12.3 WEBMENTIONSIO_API_KEY:
image: appleboy/drone-git-push from_secret: WEBMENTIONSIO_API_KEY
# settings: SSH_KEY:
# remote_name: origin from_secret:gitea_ssh_key
# branch: public
# local_ref: public # - name: store_webmentions
# commit: true # image: appleboy/drone-git-push
# commit_message: update build from hugo # when:
# author_name: DroneCI # branch:
when: # - main
branch: # settings:
- main # remote_name: origin
environment: # branch: main
INPUT_HASHFILE: hashes.sha256 # local_ref: main
INPUT_HASHTYPE: sha256 # commit: true
INPUT_PROTOCOL: ftp # commit_message: Commit latest webmentions
INPUT_HOST: sv7.byethost7.org # author_name: DroneCI
INPUT_DESTINATION: / # ssh_key:
INPUT_SOURCE: brainsteam/public # from_secret: gitea_ssh_key
INPUT_USERNAME:
from_secret: FTP_USERNAME
INPUT_PASSWORD: - name: build_site
from_secret: FTP_PASSWORD image: appleboy/drone-ssh
FTP_HOSTNAME: sv7.byethost7.org settings:
commands: host: newprobe.jamesravey.me
- apk add lftp username: james
# - cd brainsteam port: 22
# - lftp -e "mirror -R ./public /" -u $FTP_USERNAME,$FTP_PASSWORD $FTP_HOSTNAME key:
- sh sync.sh from_secret: ssh_key
# - name: webmention_check script:
# image: 3apaxicom/npx - cd /data/applications/brainsteam.co.uk
- git pull
- cd brainsteam
- ./build
# - name: hugo_build
# image: alombarte/hugo
# when: # when:
# branch: # branch:
# - main # - main
# commands: # commands:
# - npx webmention https://brainsteam.co.uk/index.xml --limit 1 --send # - git submodule init
# - git submodule update
# - cd brainsteam
# - hugo
# environment:
# INPUT_HASHFILE: hashes.sha256
# INPUT_HASHTYPE: sha256
# INPUT_PROTOCOL: ftp
# INPUT_HOST: sv7.byethost7.org
# INPUT_DESTINATION: /
# 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
# - sh sync.sh
# # - name: webmention_check
# # image: 3apaxicom/npx
# # when:
# # branch:
# # - main
# # commands:
# # - npx webmention https://brainsteam.co.uk/index.xml --limit 1 --send