Skip to content

Use includeme shortcode for code examples #248

Use includeme shortcode for code examples

Use includeme shortcode for code examples #248

Workflow file for this run

name: tech-squawks-valaidate
on: [pull_request]
jobs:
get-pulumi-projects:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install python script requirements
run: pip3 install -r scripts/requirements.txt
- id: set-matrix
run: echo "::set-output name=matrix::$(python scripts/ci_helper.py code ls)"
validate-pulumi-preview:
needs: get-pulumi-projects
runs-on: ubuntu-latest
if: ${{ needs.get-pulumi-projects.outputs.matrix != '[]' && needs.get-pulumi-projects.outputs.matrix != '' }}
strategy:
matrix:
project: ${{fromJson(needs.get-pulumi-projects.outputs.matrix)}}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-node@v2
with:
node-version: 14.x
- uses: actions/setup-go@v2
with:
go-version: 1.17.x
- uses: actions/setup-python@v2
with:
python-version: 3.9
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-region: ${{ secrets.AWS_REGION }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Install Dependencies
run: bash scripts/install_dep.sh
env:
WORKING_DIR: ${{ matrix.project }}
- uses: pulumi/actions@v4
with:
upsert: true
command: preview
stack-name: dev
work-dir: ./${{ matrix.project }}
comment-on-pr: false
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
build-website:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-node@v2
with:
node-version: 14.x
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.111.3'
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Render Static Website
run: (cd web; hugo)
pulumi-prod-preview:
runs-on: ubuntu-latest
needs: build-website
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-node@v2
with:
node-version: 14.x
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.111.3'
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Install 'embedme' tool
run: npm i embedme
- name: Embed code examples
run: npx embedme --source-root code web/content/**/*.md --silent
- name: Render Static Website
run: (cd web; hugo)
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-region: ${{ secrets.AWS_REGION }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Install Project Dependencies
run: npm i
- uses: pulumi/actions@v4
with:
command: preview
diff: true
stack-name: production
comment-on-pr: true
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}