Skip to content

Disable link check for main.tf reference in set-up-network docs (#35) #33

Disable link check for main.tf reference in set-up-network docs (#35)

Disable link check for main.tf reference in set-up-network docs (#35) #33

name: Template Deploy
on:
push:
branches:
- main
workflow_dispatch:
# Only allow one workflow at a time to prevent race conditions when pushing changes to the project repo
concurrency: platform-template-only-cd
jobs:
deploy:
name: Deploy to ${{ matrix.project_repo }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
project_repo:
- navapbc/platform-test-azure
steps:
- name: Configure SSH keys
uses: tanmancan/action-setup-ssh-agent-key@1.0.0
with:
ssh-private-key: ${{ secrets.PLATFORM_BOT_SSH_PRIVATE_KEY }}
- name: Checkout project repo
run: |
git clone git@github.com:${{ matrix.project_repo }}.git project-repo
# Set up Python since built in Python version (3.10.12) is not supported by Platform CLI (<4.0,>=3.11)
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install nava-platform CLI
run: pipx install --python "$(which python)" git+https://github.com/navapbc/platform-cli
- name: Configure git
working-directory: project-repo
run: |
git config user.name nava-platform-bot
git config user.email platform-admins@navapbc.com
- name: Update infra template
working-directory: project-repo
run: nava-platform infra update --template-uri git@github.com:${{ github.repository }}.git --version HEAD .
- name: Install example app
if: "${{ matrix.project_repo == 'navapbc/platform-test-azure' }}"
run: |
git clone git@github.com:${{ github.repository }}.git template-infra-azure
# replace existing app with updated example app code
rm -rf ./project-repo/app
mv -vf ./template-infra-azure/template-only-app ./project-repo/app
# and commit if there are changes
cd project-repo
if [[ $(git status app --porcelain | wc -l) -ne 0 ]]; then
git add app
git commit --message "Update app/ from example"
fi
- name: Push changes to project repo
working-directory: project-repo
run: git push