Skip to content

new Release added by andrey.malokhovetskiy@aspose.com #95

new Release added by andrey.malokhovetskiy@aspose.com

new Release added by andrey.malokhovetskiy@aspose.com #95

# This is a basic workflow to help you get started with Actions
name: prod-pub
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the mentioned branches
push:
branches: [ main ]
paths:
- 'content/de/pub/**'
- 'content/el/pub/**'
- 'content/en/pub/**'
- 'content/es/pub/**'
- 'content/fr/pub/**'
- 'content/id/pub/**'
- 'content/ja/pub/**'
- 'content/pt/pub/**'
- 'content/ru/pub/**'
- 'content/tr/pub/**'
- 'content/zh/pub/**'
# Allows the workflow run manually from the Actions tab
workflow_dispatch:
jobs:
# This workflow contains a single job called "deploy"
deploy:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true # Fetch Hugo themes
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.101.0'
- name: Remove unwanted folders
run: |
if [ -d "./content/de" ]; then
find ./content/de -mindepth 1 ! -regex '^./content/de/pub\(/.*\)?' -delete
fi
if [ -d "./content/el" ]; then
find ./content/el -mindepth 1 ! -regex '^./content/el/pub\(/.*\)?' -delete
fi
if [ -d "./content/en" ]; then
find ./content/en -mindepth 1 ! -regex '^./content/en/pub\(/.*\)?' -delete
fi
if [ -d "./content/es" ]; then
find ./content/es -mindepth 1 ! -regex '^./content/es/pub\(/.*\)?' -delete
fi
if [ -d "./content/fr" ]; then
find ./content/fr -mindepth 1 ! -regex '^./content/fr/pub\(/.*\)?' -delete
fi
if [ -d "./content/id" ]; then
find ./content/id -mindepth 1 ! -regex '^./content/id/pub\(/.*\)?' -delete
fi
if [ -d "./content/ja" ]; then
find ./content/ja -mindepth 1 ! -regex '^./content/ja/pub\(/.*\)?' -delete
fi
if [ -d "./content/pt" ]; then
find ./content/pt -mindepth 1 ! -regex '^./content/pt/pub\(/.*\)?' -delete
fi
if [ -d "./content/ru" ]; then
find ./content/ru -mindepth 1 ! -regex '^./content/ru/pub\(/.*\)?' -delete
fi
if [ -d "./content/tr" ]; then
find ./content/tr -mindepth 1 ! -regex '^./content/tr/pub\(/.*\)?' -delete
fi
if [ -d "./content/zh" ]; then
find ./content/zh -mindepth 1 ! -regex '^./content/zh/pub\(/.*\)?' -delete
fi
rm ./layouts/sitemap.xml;
ls content/ -all;
- name: Build pub pages
run: hugo --config "./config/config-prod-releases-aspose-com.toml" -b "https://releases.aspose.com/" --disableKinds=taxonomy,category --cleanDestinationDir --minify
- name: Prepare public folder
run: |
mv public/de/sitemap.xml public/de/sitemap-pub.xml;
mv public/el/sitemap.xml public/el/sitemap-pub.xml;
mv public/en/sitemap.xml public/en/sitemap-pub.xml;
mv public/es/sitemap.xml public/es/sitemap-pub.xml;
mv public/fr/sitemap.xml public/fr/sitemap-pub.xml;
mv public/id/sitemap.xml public/id/sitemap-pub.xml;
mv public/ja/sitemap.xml public/ja/sitemap-pub.xml;
mv public/pt/sitemap.xml public/pt/sitemap-pub.xml;
mv public/ru/sitemap.xml public/ru/sitemap-pub.xml;
mv public/tr/sitemap.xml public/tr/sitemap-pub.xml;
mv public/zh/sitemap.xml public/zh/sitemap-pub.xml;
rm public/index.html;
rm public/index.json;
ls public -all;
- name: Upload pub sitemap index
uses: zdurham/s3-upload-github-action@master
with:
args: --acl public-read
env:
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS}}
S3_BUCKET: 'releases.aspose.com'
FILE: 'public/sitemap.xml'
AWS_REGION: 'us-west-2'
S3_KEY: 'sitemap.xml'
- name: Upload default language folder
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: 'releases.aspose.com'
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS}}
AWS_REGION: 'us-west-2'
SOURCE_DIR: 'public/pub'
DEST_DIR: 'pub'
- name: Upload en sitemap
uses: swimlane/s3-upload-file-action@main
with:
aws_access_key_id: ${{ secrets.ACCESS_KEY }}
aws_secret_access_key: ${{ secrets.SECRET_ACCESS}}
aws_bucket: 'releases.aspose.com'
file_path: 'public/en/sitemap-pub.xml'
file_mime_type: 'application/xml'
dest_dir: 'en/'
- name: Upload de folder
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: 'releases.aspose.com'
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS}}
AWS_REGION: 'us-west-2'
SOURCE_DIR: 'public/de/pub'
DEST_DIR: 'de/pub'
- name: Upload de sitemap
uses: swimlane/s3-upload-file-action@main
with:
aws_access_key_id: ${{ secrets.ACCESS_KEY }}
aws_secret_access_key: ${{ secrets.SECRET_ACCESS}}
aws_bucket: 'releases.aspose.com'
file_path: 'public/de/sitemap-pub.xml'
file_mime_type: 'application/xml'
dest_dir: 'de/'
- name: Upload el folder
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: 'releases.aspose.com'
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS}}
AWS_REGION: 'us-west-2'
SOURCE_DIR: 'public/el/pub'
DEST_DIR: 'el/pub'
- name: Upload el sitemap
uses: swimlane/s3-upload-file-action@main
with:
aws_access_key_id: ${{ secrets.ACCESS_KEY }}
aws_secret_access_key: ${{ secrets.SECRET_ACCESS}}
aws_bucket: 'releases.aspose.com'
file_path: 'public/el/sitemap-pub.xml'
file_mime_type: 'application/xml'
dest_dir: 'el/'
- name: Upload es folder
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: 'releases.aspose.com'
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS}}
AWS_REGION: 'us-west-2'
SOURCE_DIR: 'public/es/pub'
DEST_DIR: 'es/pub'
- name: Upload es sitemap
uses: swimlane/s3-upload-file-action@main
with:
aws_access_key_id: ${{ secrets.ACCESS_KEY }}
aws_secret_access_key: ${{ secrets.SECRET_ACCESS}}
aws_bucket: 'releases.aspose.com'
file_path: 'public/es/sitemap-pub.xml'
file_mime_type: 'application/xml'
dest_dir: 'es/'
- name: Upload fr folder
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: 'releases.aspose.com'
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS}}
AWS_REGION: 'us-west-2'
SOURCE_DIR: 'public/fr/pub'
DEST_DIR: 'fr/pub'
- name: Upload fr sitemap
uses: swimlane/s3-upload-file-action@main
with:
aws_access_key_id: ${{ secrets.ACCESS_KEY }}
aws_secret_access_key: ${{ secrets.SECRET_ACCESS}}
aws_bucket: 'releases.aspose.com'
file_path: 'public/fr/sitemap-pub.xml'
file_mime_type: 'application/xml'
dest_dir: 'fr/'
- name: Upload id folder
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: 'releases.aspose.com'
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS}}
AWS_REGION: 'us-west-2'
SOURCE_DIR: 'public/id/pub'
DEST_DIR: 'id/pub'
- name: Upload id sitemap
uses: swimlane/s3-upload-file-action@main
with:
aws_access_key_id: ${{ secrets.ACCESS_KEY }}
aws_secret_access_key: ${{ secrets.SECRET_ACCESS}}
aws_bucket: 'releases.aspose.com'
file_path: 'public/id/sitemap-pub.xml'
file_mime_type: 'application/xml'
dest_dir: 'id/'
- name: Upload ja folder
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: 'releases.aspose.com'
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS}}
AWS_REGION: 'us-west-2'
SOURCE_DIR: 'public/ja/pub'
DEST_DIR: 'ja/pub'
- name: Upload ja sitemap
uses: swimlane/s3-upload-file-action@main
with:
aws_access_key_id: ${{ secrets.ACCESS_KEY }}
aws_secret_access_key: ${{ secrets.SECRET_ACCESS}}
aws_bucket: 'releases.aspose.com'
file_path: 'public/ja/sitemap-pub.xml'
file_mime_type: 'application/xml'
dest_dir: 'ja/'
- name: Upload pt folder
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: 'releases.aspose.com'
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS}}
AWS_REGION: 'us-west-2'
SOURCE_DIR: 'public/pt/pub'
DEST_DIR: 'pt/pub'
- name: Upload pt sitemap
uses: swimlane/s3-upload-file-action@main
with:
aws_access_key_id: ${{ secrets.ACCESS_KEY }}
aws_secret_access_key: ${{ secrets.SECRET_ACCESS}}
aws_bucket: 'releases.aspose.com'
file_path: 'public/pt/sitemap-pub.xml'
file_mime_type: 'application/xml'
dest_dir: 'pt/'
- name: Upload ru folder
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: 'releases.aspose.com'
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS}}
AWS_REGION: 'us-west-2'
SOURCE_DIR: 'public/ru/pub'
DEST_DIR: 'ru/pub'
- name: Upload ru sitemap
uses: swimlane/s3-upload-file-action@main
with:
aws_access_key_id: ${{ secrets.ACCESS_KEY }}
aws_secret_access_key: ${{ secrets.SECRET_ACCESS}}
aws_bucket: 'releases.aspose.com'
file_path: 'public/ru/sitemap-pub.xml'
file_mime_type: 'application/xml'
dest_dir: 'ru/'
- name: Upload tr folder
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: 'releases.aspose.com'
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS}}
AWS_REGION: 'us-west-2'
SOURCE_DIR: 'public/tr/pub'
DEST_DIR: 'tr/pub'
- name: Upload tr sitemap
uses: swimlane/s3-upload-file-action@main
with:
aws_access_key_id: ${{ secrets.ACCESS_KEY }}
aws_secret_access_key: ${{ secrets.SECRET_ACCESS}}
aws_bucket: 'releases.aspose.com'
file_path: 'public/tr/sitemap-pub.xml'
file_mime_type: 'application/xml'
dest_dir: 'tr/'
- name: Upload zh folder
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: 'releases.aspose.com'
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS}}
AWS_REGION: 'us-west-2'
SOURCE_DIR: 'public/zh/pub'
DEST_DIR: 'zh/pub'
- name: Upload zh sitemap
uses: swimlane/s3-upload-file-action@main
with:
aws_access_key_id: ${{ secrets.ACCESS_KEY }}
aws_secret_access_key: ${{ secrets.SECRET_ACCESS}}
aws_bucket: 'releases.aspose.com'
file_path: 'public/zh/sitemap-pub.xml'
file_mime_type: 'application/xml'
dest_dir: 'zh/'
# Invalidate Cloudfront (this action)
- name: invalidate
continue-on-error: true
uses: chetan/invalidate-cloudfront-action@master
env:
DISTRIBUTION: ${{ secrets.AWS_DISTRIBUTION_PROD }}
PATHS: / /index.html /index.json /sitemap.xml /de/sitemap-pub.xml /el/sitemap-pub.xml /en/sitemap-pub.xml /es/sitemap-pub.xml /fr/sitemap-pub.xml /id/sitemap-pub.xml /ja/sitemap-pub.xml /pt/sitemap-pub.xml /ru/sitemap-pub.xml /tr/sitemap-pub.xml /zh/sitemap-pub.xml /pub/* /de/pub/* /el/pub/* /en/pub/* /es/pub/* /fr/pub/* /id/pub/* /ja/pub/* /pt/pub/* /ru/pub/* /tr/pub/* /zh/pub/*
AWS_REGION: 'us-west-2'
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS }}