Skip to content

Commit

Permalink
Pull hugo on deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
nikdoof committed Apr 3, 2024
1 parent 2157c73 commit 59e65f7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/deploy-production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ jobs:
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
Expand All @@ -17,8 +19,11 @@ jobs:
key: ${{ secrets.DIMENSION_DEPLOYMENT_SSH_KEY }}
port: 22
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 /usr/local/bin/hugo -d /var/www/dimension.sh --gc -b https://dimension.sh/
sudo ${TMP}/hugo -d /var/www/dimension.sh --gc -b https://dimension.sh/

0 comments on commit 59e65f7

Please sign in to comment.