~lobisquit/personal-website

8d1f93c5e5b6ae352fef79f025b771e97b58755a — Enrico Lovisotto 2 years ago 32206ac
PUBLIC and WEBSITE are preset in script now
2 files changed, 5 insertions(+), 4 deletions(-)

M .gitlab-ci.yml
M publish.sh
M .gitlab-ci.yml => .gitlab-ci.yml +0 -4
@@ 1,9 1,5 @@
image: rust

variables:
  WEBSITE: website
  PUBLIC: public

pages:
  script:
    - ./publish.sh

M publish.sh => publish.sh +5 -0
@@ 1,5 1,10 @@
#!/bin/bash

set -ex

PUBLIC=public/
WEBSITE=website/

# clean and re-populate the public/ folder
mkdir -p "$PUBLIC"
find "$PUBLIC" -type f \( -name "*.html" -or -name "*.gz" -or -name "*.svg"  -or -name "*.css" -or -name "*.pdf" \) -exec rm "{}" \;