Skip to content

Total-Split

Total-Split #117

Workflow file for this run

name: Total-Split
on:
workflow_dispatch:
inputs:
environment:
description: 'Build environment'
type: environment
default: staging
required: true
jobs:
deploy:
runs-on: ubuntu-latest
environment: ${{ github.event.inputs.environment }}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
continue-on-error: true
strategy:
fail-fast: false
matrix:
configure_one_product:
- android
- cpp
- curl
- go
- java
- net
- nodejs
- perl
- php
- python
- ruby
- swift
steps:
- name: Checkout theme repo
uses: actions/checkout@main
with:
repository: aspose-cloud/products.aspose.cloud
token: ${{ secrets.REPO_TOKEN }}
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: Update npm
run: npm install -g npm@latest
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2.4.13
with:
hugo-version: 0.136.5
extended: true
- name: Install Dependicies1
run: npm install -D autoprefixer postcss-cli
- name: Install Node.js dependencies
run: npm install
- name: Configure build environment
env:
CONFIGURE_ONE_PRODUCT: ${{ matrix.configure_one_product }}
run: npm run configure
- name: Display config.json
run: cat /home/runner/work/products.aspose.cloud-workflows/products.aspose.cloud-workflows/config.json
# Following are for macos
# run: cat /Users/runner/work/products.aspose.cloud-workflows/products.aspose.cloud-workflows/config.json
- name: Build ${{ matrix.configure_one_product }}
run: hugo --config "config/config-total.toml","config.json" -c "content/total" -b "${{ vars.BASEURL }}total" --cleanDestinationDir --minify
--templateMetrics --templateMetricsHints
- name: Prepare public folder
run: |
find /home/runner/work/products.aspose.cloud-workflows/products.aspose.cloud-workflows/public -iname 'sitemap.xml' -execdir mv -i '{}' ${{ matrix.configure_one_product }}.xml \;
mv /home/runner/work/products.aspose.cloud-workflows/products.aspose.cloud-workflows/${{ vars.INDEX_SITEMAP }} public/sitemap.xml
# Following are for macos
# find /Users/runner/work/products.aspose.cloud-workflows/products.aspose.cloud-workflows/public -iname 'sitemap.xml' -execdir mv -i '{}' ${{ matrix.configure_one_product }}.xml \;=
# mv /Users/runner/work/products.aspose.cloud-workflows/products.aspose.cloud-workflows/${{ vars.INDEX_SITEMAP }} public/sitemap.xml;
- name: Deploy ${{ matrix.configure_one_product }} to S3
run: hugo deploy --config "config/config-total.toml" --maxDeletes=0 --target "${{ github.event.inputs.environment }}"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS }}