Code cleanup #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Hugo-CI | |
on: | |
push: | |
branches: [ master, main ] | |
paths-ignore: | |
- ".github/**" | |
jobs: | |
job-one: | |
name: Deploy | |
runs-on: [self-hosted, linux, x64, dev4-barcode-cloud] | |
steps: | |
- name: hugo build | |
run: | | |
cd aspose-barcode-cloud-docs && git stash && git pull && cd - | |
cd lutsk-aspose-prototype && git stash && git pull | |
cd themes/lutsk-aspose-theme && git stash && git pull && cd - | |
sudo npm install -D --save autoprefixer | |
sudo npm install -D --save postcss-cli | |
rsync --recursive --delete --force --progress ${{ secrets.PROJECTPATH }} content/ | |
rm -rf public | |
hugo --minify --baseURL https://docs.aspose.cloud/barcode | |
rsync --recursive --delete --force -e "ssh" --progress public/ ${{ secrets.TRANSFERPATH }} | |
- name: hugo deploy | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USERNAME }} | |
key: ${{ secrets.SSHKEY }} | |
port: ${{ secrets.SSHPORT }} | |
script: | | |
sudo rsync --recursive --delete --force --progress ${{ secrets.PUBLICCONTENTPATH }} ${{ secrets.DEPLOYPATH }} | |
sudo nginx -s reload |