Fixed and improved page /java/barcode-generation-and-recognition-tuto… #690
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, qa ] | |
paths-ignore: | |
'.github/**' | |
jobs: | |
job-one: | |
name: Deploy_to_production | |
runs-on: [self-hosted, linux, x64, dev4-barcode] | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- name: hugo build | |
run: | | |
cd aspose-barcode-docs | |
git clone --branch master https://github.com/aspose-barcode/Aspose.BarCode-Documentation.git || (cd Aspose.BarCode-Documentation && git checkout master && 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/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 | |
job-two: | |
name: Deploy_to_qa | |
runs-on: [self-hosted, linux, x64, dev4-barcode] | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_KEY }} | |
if: github.ref == 'refs/heads/qa' | |
steps: | |
- name: hugo build and deploy | |
run: | | |
cd aspose-barcode-docs | |
git clone --branch qa https://github.com/aspose-barcode/Aspose.BarCode-Documentation.git || (cd Aspose.BarCode-Documentation && git checkout qa && 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-qa.aspose.com/barcode | |
echo "Deploy to S3" | |
aws s3 sync ./public/ ${{ secrets.QA_S3_BUCKET }} --delete --only-show-errors | |
curl -d '{"website":"https://docs-qa.aspose.com/barcode/*"}' -H "Content-Type: application/json" -X POST "https://ut8o7juetc.execute-api.us-west-2.amazonaws.com/CloudFront-Invalidation-API" |