Merge pull request #336 from aspose-pdf/fix-links-2 #990
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-prod | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
'.github/**' | |
workflow_dispatch: | |
jobs: | |
job-one: | |
name: Deploy | |
runs-on: [self-hosted, linux, x64, dev4-pdf] | |
steps: | |
- name: hugo build | |
run: | | |
mkdir -p aspose-pdf-docs | |
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 |