Skip to content

Merge pull request #1392 from jasonrandrews/review #1359

Merge pull request #1392 from jasonrandrews/review

Merge pull request #1392 from jasonrandrews/review #1359

Workflow file for this run

# This workflow will be triggered on a push to the 'main' branch automatically or when called manually.
# Upon running this workflow, the website will be built and deployed to the internal instance.
name: Build and Deploy Internal Website
on:
# Runs on pushes to the 'main' branch
push:
branches: [main]
# Allows to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build_and_deploy_internal_existing:
name: Build and Deploy Internal Existing
# The type of runner that the job will run on
runs-on: ubuntu-latest
# 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@v4
with:
submodules: true # Fetch Hugo Themes
fetch-depth: 0
# Sets Up Hugo
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: "0.130.0"
extended: true
# Post-CSS install and Node.js
- name: Install Post-CSS
run: npm install postcss-cli
# Builds arm-software-developer repo
- name: Build
run: |
hugo --minify
cp learn-image-sitemap.xml public/learn-image-sitemap.xml
bin/pagefind --site "public"
env:
HUGO_LLM_API: ${{ secrets.HUGO_LLM_API }}
# Deploys website to AWS S3
- name: Deploy to S3
run: hugo deploy --force --maxDeletes -1 --invalidateCDN --target internal-existing
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
build_and_deploy_internal:
name: Build and Deploy Internal
uses: ./.github/workflows/deploy.yml
permissions:
id-token: write
contents: read
with:
target: internal
secrets:
AWS_OIDC_ROLE: ${{ secrets.AWS_OIDC_ROLE_INTERNAL }}
HUGO_LLM_API: ${{ secrets.HUGO_LLM_API }}