diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..48d3da5 --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,44 @@ +name: Build+deploy website + +on: + push: + branches: [master] + paths-ignore: + - '.gitignore' + - '.travis.yml' + - 'README.md' + - '*.sh' + - '*.json' + + pull_request: + branches: [master] + types: [merged] + +jobs: + build-deploy: + runs-on: ubuntu-latest + environment: 'TkkrLab website' + steps: + - name: Git Checkout (with submodules) + uses: actions/checkout@v3 + with: + submodules: true + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: '0.111.3' + extended: true + + - name: Build + run: bash build.sh + + - name: Deploy with Rsync + uses: SamKirkland/web-deploy@v1 + with: + source-path: './public/' + target-server: ${{ vars.HOST }} + ssh-port: ${{ vars.SSH_PORT }} + remote-user: ${{ vars.SSH_USER }} + private-ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} + destination-path: ${{ vars.WEBROOT }} diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..e5b8c58 --- /dev/null +++ b/build.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -e +set -u + +git submodule update --init --recursive +#npm install +#cd themes/docsy +#npm install +#cd ../.. +export HUGO_ENV="production" +hugo --gc --minify diff --git a/config/_default/config.yaml b/config/_default/config.yaml index 0507b80..6ba19ce 100644 --- a/config/_default/config.yaml +++ b/config/_default/config.yaml @@ -5,7 +5,6 @@ logo: /site_header.png enableRobotsTXT: false canonifyURLs: true -googleAnalytics: UA-610785-7 languages: nl: