Skip to content

publish-to-prod-environment #2

publish-to-prod-environment

publish-to-prod-environment #2

name: publish-to-prod-environment
on:
workflow_dispatch:
inputs:
folder:
description: 'Content to publish'
required: true
default: 'Vantage (English)'
type: choice
options:
- Vantage (English)
- Vantage (ja, fr, es, de)
jobs:
sftp-files-to-cdn-and-purge-cache:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: Vantage
- name: FTPS Vantage (English)
if: ${{ inputs.folder == 'Vantage (English)' }}
run: |
lftp -e "
open -u ${{ secrets.CDN_FTP_USERNAME }},${{ secrets.CDN_FTP_PASSWORD }} ${{ secrets.CDN_FTP_HOST }};
cd product-help/Vantage;
mput Vantage/*.md;
mput Vantage/*.json;
cd Images;
mput Vantage/Images/*;
bye
"
- name: FTPS Vantage translations (ja, fr, es, de)
if: ${{ inputs.folder == 'Vantage (ja, fr, es, de)' }}
run: |
lftp -e "
open -u ${{ secrets.CDN_FTP_USERNAME }},${{ secrets.CDN_FTP_PASSWORD }} ${{ secrets.CDN_FTP_HOST }};
cd product-help/Vantage;
cd ja;
mput Vantage/ja/*.md;
mput Vantage/ja/*.json;
cd Images;
mput Vantage/ja/Images/*;
cd ../..;
cd fr;
mput Vantage/fr/*.md;
mput Vantage/fr/*.json;
cd Images;
mput Vantage/fr/Images/*;
cd ../..;
cd es;
mput Vantage/es/*.md;
mput Vantage/es/*.json;
cd Images;
mput Vantage/es/Images/*;
cd ../..;
cd de;
mput Vantage/de/*.md;
mput Vantage/de/*.json;
cd Images;
mput Vantage/de/Images/*;
bye
"
- name: purge cache
run: |
/home/tdadmin/.local/bin/http --ignore-stdin --auth-type=edgegrid -a default: :/ccu/v3/invalidate/cpcode/production objects:='[1051984]'