-
Notifications
You must be signed in to change notification settings - Fork 3
33 lines (32 loc) · 1.21 KB
/
hugo-workflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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