Skip to content

awsproductsUpdater

awsproductsUpdater #79

Workflow file for this run

name: awsproductsUpdater
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: ["main"]
schedule:
- cron: "0 0 * * 0"
# 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
permissions:
contents: write
pull-requests: write
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Runs a set of commands using the runners shell
- name: Generate AWS Product Markdown
run: ./generateawsproducts.sh
- name: Ensure build dir exists
run: mkdir -p build
- name: Copy images directory (if exists)
run: if [[ -d img ]]; then cp -R img build/img; fi
- name: Marp Build (awsproducts)
uses: docker://marpteam/marp-cli:v3.0.2
with:
args: awsproducts.md -o build/index.html
env:
MARP_USER: root:root
- name: Marp Build (awsproducts.pptx)
uses: docker://marpteam/marp-cli:v3.0.2
with:
args: awsproducts.md --allow-local-files -o build/awsproducts.pptx
env:
MARP_USER: root:root
- name: Invert Colours for PDF
run: sed -i 's/class:/#class:/g' awsproducts.md
- name: Marp Build (awsproducts.pdf)
uses: docker://marpteam/marp-cli:v3.0.2
with:
args: awsproducts.md --allow-local-files -o build/awsproducts.pdf
env:
MARP_USER: root:root
- name: Deploy preview
if: ${{ github.event_name == 'pull_request' }}
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./build/
preview-branch: gh-pages
umbrella-dir: pr-preview
- name: Deploy production
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: ./build/
clean-exclude: pr-preview/