Skip to content

Update file(s) "/." from "aspose-imaging/Aspose.Imaging-API-References" #49

Update file(s) "/." from "aspose-imaging/Aspose.Imaging-API-References"

Update file(s) "/." from "aspose-imaging/Aspose.Imaging-API-References" #49

# This is a basic workflow to help you get started with Actions
name: apireference2.aspose.com(imaging)(Stage)
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ main ]
paths:
- 'content/sites/aspose/imaging/**'
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
continue-on-error: true
strategy:
fail-fast: false
matrix:
configure_one_product:
- python-net
- java
- net
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true # Fetch Hugo themes
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Checkout theme repo
uses: actions/checkout@main
with:
repository: Aspose/api-theme
token: ${{ secrets.REPO_TOKEN }}
fetch-depth: 0
ref: imaging
path: themes/api-theme
# Step 2 - Sets up the latest version of Hugo
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.119.0'
extended: true
- name: Install Dependicies1
run: npm install -D --save autoprefixer
- name: Install Dependicies2
run: npm install -D --save postcss-cli
- name: Configure build environment
env:
CONFIGURE_ONE_PRODUCT: ${{ matrix.configure_one_product }}
CONFIGURE_FAMILY: 'imaging'
run: npm run configure
- name: Display config.json
run: cat ${{ github.workspace }}/config.json
# Also specifies the theme we want to use
- name: Build
run: hugo --configDir config/sites/aspose/imaging --config "config.json" --environment staging --minify --cleanDestinationDir
- name: Prepare public folder
run: |
find ${{ github.workspace }}/public -iname 'sitemap.xml' -execdir mv -i '{}' ${{ matrix.configure_one_product }}.xml \;
mv ${{ github.workspace }}/total.imaging.sitemap public/sitemap.xml;
- name: Deploy apireference2.aspose.com(imaging)(Stage) to S3
run: hugo --configDir config/sites/aspose/imaging --environment staging deploy --target "Stage" --maxDeletes=0 --force
env:
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS }}
# Invalidate Cloudfront Home Page
- name: invalidate
uses: chetan/invalidate-cloudfront-action@v2
env:
DISTRIBUTION: ${{ secrets.AWS_DISTRIBUTION }}
PATHS: /imaging/${{ matrix.configure_one_product }}/*
AWS_REGION: 'us-west-2'
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS }}