~scolby33/scolbyblog

5fa9d1fe695ef6509659131339be2577eaa24455 — Scott Colby 8 months ago 5f76149
Ping about updated sitemap.
1 files changed, 10 insertions(+), 0 deletions(-)

M .build.yml
M .build.yml => .build.yml +10 -0
@@ 1,5 1,6 @@
image: debian/stable
packages:
  - 'curl'
  - 'fonts-liberation'
  - 'imagemagick'
  - 'npm'


@@ 45,6 46,12 @@ tasks:
      printf "ssh.phx.nearlyfreespeech.net ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJInlNsEgCi/Q2vmF0QJh5F7ZHzrx4oCZIZgr5P1z64Z\n" >> ~/.ssh/known_hosts
      cd scolbyblog
      rm output/assets/{main,pygments}.css
      tmpfile=$(mktemp)
      rsync \
        --info=COPY,DEL,FLIST2,MISC2,NAME,STATS3,SYMSAFE \
        --compress \
        scolby_scolby@ssh.phx.nearlyfreespeech.net:/home/public/www.scolby.com/sitemap.xml
        "$tmpfile"
      rsync \
        --info=COPY,DEL,FLIST2,MISC2,NAME,STATS3,SYMSAFE \
        --compress \


@@ 66,5 73,8 @@ tasks:
        mv www.scolby.com /home/public
        cd releases && ls -t | tail -n +3 | xargs rm -rvf
      "
      diff_rc=0; diff --brief --report-identical-files "$tmpfile" output/sitemap.xml || diff_rc=$?
      test $diff_rc -eq 0 || $diff_rc -eq 1 || exit $diff_rc
      test $diff_rc -eq 1 && curl 'https://www.google.com/ping?sitemap=https://www.scolby.com/sitemap.xml'
secrets:
  - '2ccf0ee2-3429-473d-91c5-bbf637a4be5a'