Skip to content

staging-complete

staging-complete #2

name: medical-Staging
on:
repository_dispatch:
types: [staging-complete]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout theme repo
uses: actions/checkout@main
with:
repository: Aspose/tutorials.aspose.com
token: ${{ secrets.REPO_TOKEN }}
fetch-depth: 0
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.135.0'
extended: true
- name: Install autoprefixer
run: npm install -D --save autoprefixer
- name: Install postcss-cli
run: npm install -D --save postcss-cli
- name: Find and replace url param in frontmatter
uses: jacobtomlinson/gha-find-replace@v2
with:
find: "url:"
replace: "url_ignore:"
include: "_index.md"
- name: Find and replace domain name
uses: jacobtomlinson/gha-find-replace@v2
with:
find: "tutorials.aspose.com"
replace: "tutorials2.aspose.com"
include: "_index.md"
- name: Find and replace image url domain
uses: jacobtomlinson/gha-find-replace@v2
with:
find: "logoImageSrc=\"https://www.aspose.cloud/"
replace: "logoImageSrc=\"https://cms.admin.containerize.com/"
include: "_index.md"
- name: Build medical
run: hugo --config "configs/medical.toml" -c "content/medical" -b "https://tutorials2.aspose.com/medical" --cleanDestinationDir --minify
- name: Sync to Ceph S3
run: |
aws s3 sync ./public/ s3://qa-tutorials-aspose-com/medical/ \
--endpoint-url https://s3-qa.dynabic.com \
--acl public-read \
--delete
env:
AWS_ACCESS_KEY_ID: ${{ secrets.CEPH_S3_QA_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CEPH_S3_QA_SECRET_KEY }}
AWS_DEFAULT_REGION: us-east-1
AWS_ENDPOINT_URL: https://s3-admin-qa.dynabic.com
- name: Purge BunnyCDN Cache
run: |
curl -siG \
-H "X-Api-Key: ${{ secrets.BUNNY_API_KEY }}" \
--data-urlencode "url=https://qa-tutorials.aspose.com/medical" \
"https://api.dynabic.com/bn/purge?async=true"