Skip to content

Update themes

Update themes #28

name: Deploy
"on":
push:
branches:
- main
jobs:
deploy:
name: Deploy to Production
environment: production
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.124.1
steps:
- name: Deploy to target system
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.TARGET_HOST }}
username: ${{ secrets.DIMENSION_DEPLOYMENT_USER }}
key: ${{ secrets.DIMENSION_DEPLOYMENT_SSH_KEY }}
port: 22
envs: HUGO_VERSION
script: |
TMP=$(mktemp -d)
wget -O ${TMP}/hugo.tar.gz https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz
tar -zxvf ${TMP}/hugo.tar.gz hugo && mv hugo ${TMP} && chmod a+x ${TMP}/hugo
cd /usr/local/src/www-site
sudo git config pull.ff only
sudo git reset --hard
sudo git pull
sudo ${TMP}/hugo --gc --minify --logLevel INFO -d /var/www/dimension.sh -b https://dimension.sh/
rm -rf ${TMP}