Skip to content

Commit

Permalink
Update hugo-worklow.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ChOleksii authored Nov 27, 2023
1 parent d60d638 commit ce90f99
Showing 1 changed file with 25 additions and 21 deletions.
46 changes: 25 additions & 21 deletions .github/workflows/hugo-worklow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Hugo-CI
on:
push:
branches: [master]
paths-ignore: ".github/**"
# paths-ignore: ".github/**"

jobs:
job-one:
Expand All @@ -11,23 +11,27 @@ jobs:
steps:
- name: hugo build
run: |
git clone https://github.com/aspose-ocr-cloud/aspose-ocr-cloud-docs.git || (cd aspose-ocr-cloud-docs && 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.cloud/ocr
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
echo ${{ secrets.PROJECTPATH }} > file1
echo ${{ secrets.PUBLICCONTENTPATH }} >> file1
echo ${{ secrets.DEPLOYPATH }} >> file1
echo ${{ secrets.PROJECTPATH }} >> file1
# git clone https://github.com/aspose-ocr-cloud/aspose-ocr-cloud-docs.git || (cd aspose-ocr-cloud-docs && 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.cloud/ocr
# 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

0 comments on commit ce90f99

Please sign in to comment.