Skip to content

Optimize 46 Conversion Java pages #42

Optimize 46 Conversion Java pages

Optimize 46 Conversion Java pages #42

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: tutorials.groupdocs.com(tutorials-conversion)(family)(Production)
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
paths:
- 'content/**'
pull_request:
branches: [ master ]
paths:
- 'content/**'
# 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
# Steps represent a sequence of conversion that will be executed as part of the job
steps:
# Free up disk space
- name: Free Disk Space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/share/boost
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo apt-get clean
df -h
# 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: groupdocs/tutorials-theme
token: ${{ secrets.REPO_TOKEN }}
fetch-depth: 0
path: themes/tutorials-theme
- name: Install Theme Dependencies
run: npm install
working-directory: ./themes/tutorials-theme
# Step 2 - Sets up the latest version of Hugo
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: 'latest'
extended: true
- name: Install Dependicies1
run: npm install -D --save autoprefixer
- name: Install Dependicies2
run: npm install -D --save postcss-cli
- name: Install Dependicies3
run: npm install -D postcss
# Also specifies the theme we want to use
- name: Build
run: hugo --configDir config/conversion --environment production --minify
- name: Sync to Ceph S3
run: |
aws s3 sync ./public/ s3://tutorials-groupdocs-com/conversion/ \
--endpoint-url https://s3.dynabic.com \
--acl public-read \
--delete \
--exclude "*.map" \
--cache-control "public, max-age=3600"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.CEPH_S3_LIVE_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CEPH_S3_LIVE_SECRET_KEY }}
AWS_DEFAULT_REGION: us-east-1
AWS_ENDPOINT_URL: https://s3-admin.dynabic.com
- name: Purge BunnyCDN Cache
run: |
curl -siG \
-H "X-Api-Key: ${{ secrets.BUNNY_API_KEY }}" \
--data-urlencode "url=https://tutorials.groupdocs.com/conversion" \
"https://api.dynabic.com/bn/purge?async=true"