-
Notifications
You must be signed in to change notification settings - Fork 3
37 lines (36 loc) · 1.59 KB
/
hugo-ci-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
34
35
36
37
name: Hugo-CI
on:
push:
branches:
- master
paths-ignore:
'.github/**'
jobs:
job-one:
name: Deploy
runs-on: [self-hosted, linux, x64, dev4-pdf]
steps:
- name: hugo build
run: |
cd aspose-pdf-docs
git clone https://github.com/aspose-pdf/Aspose.PDF-Documentation.git || (cd Aspose.PDF-Documentation && git pull)
git clone --single-branch --branch master https://git.dev.dynabic.com/containerize-hugo/lutsk-aspose-prototype.git || (cd lutsk-aspose-prototype && git pull)
cd lutsk-aspose-prototype
git clone --single-branch --branch master https://git.dev.dynabic.com/containerize-hugo/lutsk-aspose-theme.git themes/lutsk-aspose-theme || (cd themes/lutsk-aspose-theme && git pull)
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.com/pdf
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 chmod -R 755 ${{ secrets.DEPLOYPATH }}
sudo nginx -s reload