29 lines
956 B
YAML
29 lines
956 B
YAML
on:
|
|
push:
|
|
schedule:
|
|
- cron: "42 18 * * 5" # Weekly
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: debian-amd64
|
|
steps:
|
|
- name: checkout
|
|
run: |
|
|
mkdir -m 0700 ~/.ssh
|
|
echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id_rsa
|
|
echo StrictHostKeyChecking=no >> ~/.ssh/config
|
|
chmod 0400 ~/.ssh/*
|
|
git clone --recurse-submodules ssh://gitea@juju.nz:3022/$GITHUB_REPOSITORY.git .
|
|
git checkout $GITHUB_SHA
|
|
- name: build
|
|
run: |
|
|
apt -qq update
|
|
apt -qq install -y -q rsync pandoc wget git
|
|
git submodule update --init --recursive
|
|
wget -O $RUNNER_TEMP/hugo.deb -nv https://github.com/gohugoio/hugo/releases/download/v0.121.1/hugo_extended_0.121.1_linux-amd64.deb
|
|
dpkg --install $RUNNER_TEMP/hugo.deb
|
|
hugo version
|
|
hugo --minify
|
|
- name: publish
|
|
run: |
|
|
rsync -rlt public/ $GITHUB_REPOSITORY_OWNER@juju.nz:www
|