Total-Split #88
This file contains hidden or 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: Total-Split | |
on: | |
workflow_dispatch: | |
inputs: | |
environment: | |
description: 'Build environment' | |
type: environment | |
default: staging | |
required: true | |
jobs: | |
deploy: | |
runs-on: macos-13 | |
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: 18 | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2.4.13 | |
with: | |
hugo-version: 0.101.0 | |
extended: true | |
- 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 /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 /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 }} |