diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 6f57fe4..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,19 +0,0 @@ -version: 2 -jobs: - build: - docker: - - image: buildpack-deps:stretch - steps: - - checkout - - run: - name: Install Hugo - command: ./ci-install-hugo.sh - - run: - name: Hugo - command: hugo - - deploy: - name: Deploy - command: | - if [ "${CIRCLE_BRANCH}" == "master" ]; then - ./update_github_pages.sh - fi diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..60afb42 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,34 @@ +name: Deploy to Pages +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-22.04 + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + fetch-depth: 0 + + - name: Hugo setup + uses: peaceiris/actions-hugo@v3 + with: + hugo-version: '0.119.0' + + - name: Build + run: hugo --minify + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: ${{ github.ref == 'refs/heads/main' }} + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./public diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..31712fe --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +hypriot.io diff --git a/ci-install-hugo.sh b/ci-install-hugo.sh deleted file mode 100755 index 2c248b7..0000000 --- a/ci-install-hugo.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -HUGO_VERSION=0.18 - -set -e - -# Install Hugo if not already cached or upgrade an old version. -wget https://github.com/spf13/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz -tar xvzf hugo_${HUGO_VERSION}_Linux-64bit.tar.gz -cp hugo_${HUGO_VERSION}_linux_amd64/hugo_${HUGO_VERSION}_linux_amd64 /usr/bin/hugo -rm -rf hugo_${HUGO_VERSION}_linux_amd64* diff --git a/themes/hyde/layouts/partials/head.html b/themes/hyde/layouts/partials/head.html index 5df2853..b9c87a4 100644 --- a/themes/hyde/layouts/partials/head.html +++ b/themes/hyde/layouts/partials/head.html @@ -3,7 +3,7 @@
- + @@ -20,7 +20,5 @@ - - {{ partial "google_analytics.html" . }} diff --git a/themes/hyde/layouts/partials/sidebar.html b/themes/hyde/layouts/partials/sidebar.html index 2b74b7d..9e7803b 100644 --- a/themes/hyde/layouts/partials/sidebar.html +++ b/themes/hyde/layouts/partials/sidebar.html @@ -17,7 +17,7 @@{{ with .Site.Params.Copyright }}{{.}}{{ else }}© {{.Now.Format "2006"}} Hypriot {{end}}
+{{ with .Site.Params.Copyright }}{{.}}{{ else }}© 2006-2020 Hypriot {{end}}
diff --git a/update_github_pages.sh b/update_github_pages.sh deleted file mode 100755 index 5611cdc..0000000 --- a/update_github_pages.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -cd ./public - -git init -git config user.name "Hugo Builder" -git config user.email "hugo.builder@hypriot.com" -git remote add upstream "https://${GITHUB_TOKEN}@github.com/hypriot/hypriot.github.io.git" -git fetch upstream -git reset upstream/master - -git add -A . -git commit -m "CircleCi build #${CIRCLE_BUILD_NUM} with git commit ${CIRCLE_SHA1}" -git remote show upstream -git push -q upstream HEAD:master