From 37e84d8cd5036871a599469f5762f5c011b27e42 Mon Sep 17 00:00:00 2001 From: lauralani Date: Tue, 1 Aug 2023 09:10:15 +0200 Subject: [PATCH] add netlify config --- .woodpecker/deploy.yml | 54 ++++++++++++++++++------------ static/.domains | 4 --- static/.well-known/matrix/.gitkeep | 0 static/.well-known/matrix/test | 1 + static/netlify.toml | 5 +++ 5 files changed, 39 insertions(+), 25 deletions(-) delete mode 100644 static/.domains create mode 100644 static/.well-known/matrix/.gitkeep create mode 100644 static/.well-known/matrix/test create mode 100644 static/netlify.toml diff --git a/.woodpecker/deploy.yml b/.woodpecker/deploy.yml index 1a2359a..73dab7c 100644 --- a/.woodpecker/deploy.yml +++ b/.woodpecker/deploy.yml @@ -33,26 +33,38 @@ steps: when: event: [ pull_request, push ] - publish: - image: bitnami/git - # Must be set in Woodpecker configuration - secrets: - - codeberg_token - environment: - DEST_REPONAME: dest_repo - commands: - # Git configuration - - git config --global user.email noreply@example.com - - git config --global user.name "Woodpecker CI" - - git clone https://$CODEBERG_TOKEN@codeberg.org/lila-network/pages.git $DEST_REPONAME - # Copy build step output to repository folder - - cp -ar ./hugo_public/. $DEST_REPONAME/ - # Needed for custom domains - - cp .domains $DEST_REPONAME || true # Ignore if it doesn't exist - # Commit and push all static files with pipeline started timestamp - - cd $DEST_REPONAME - - git add . - - git commit -m "Woodpecker CI ${CI_BUILD_CREATED}" - - git push + + netlify-deploy: + image: node:alpine when: event: push + secrets: + - NETLIFY_AUTH_TOKEN + - NETLIFY_SITE_ID + commands: + - npm install netlify-cli -g + - netlify deploy --prod --dir ./hugo_public + +# publish: +# image: bitnami/git +# # Must be set in Woodpecker configuration +# secrets: +# - codeberg_token +# environment: +# DEST_REPONAME: dest_repo +# commands: +# # Git configuration +# - git config --global user.email noreply@example.com +# - git config --global user.name "Woodpecker CI" +# - git clone https://$CODEBERG_TOKEN@codeberg.org/lila-network/pages.git $DEST_REPONAME +# # Copy build step output to repository folder +# - cp -ar ./hugo_public/. $DEST_REPONAME/ +# # Needed for custom domains +# - cp .domains $DEST_REPONAME || true # Ignore if it doesn't exist +# # Commit and push all static files with pipeline started timestamp +# - cd $DEST_REPONAME +# - git add . +# - git commit -m "Woodpecker CI ${CI_BUILD_CREATED}" +# - git push +# when: +# event: push diff --git a/static/.domains b/static/.domains deleted file mode 100644 index 9b25e68..0000000 --- a/static/.domains +++ /dev/null @@ -1,4 +0,0 @@ -lila.network -lila-network.codeberg.page -pages.lila-network.codeberg.page -pages.pages.lila-network.codeberg.page \ No newline at end of file diff --git a/static/.well-known/matrix/.gitkeep b/static/.well-known/matrix/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/static/.well-known/matrix/test b/static/.well-known/matrix/test new file mode 100644 index 0000000..055b43a --- /dev/null +++ b/static/.well-known/matrix/test @@ -0,0 +1 @@ +{"m.server": "matrix.example.com:443"} \ No newline at end of file diff --git a/static/netlify.toml b/static/netlify.toml new file mode 100644 index 0000000..d104937 --- /dev/null +++ b/static/netlify.toml @@ -0,0 +1,5 @@ +[[headers]] + for = "/.well-known/matrix/*" + [headers.values] + Content-Type = "application/json" + Access-Control-Allow-Origin = "*"