Skip to content

Support Platform CLI (#381) #211

Support Platform CLI (#381)

Support Platform CLI (#381) #211

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: template-only-cd
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout template repo
uses: actions/checkout@v4
with:
path: template-application-nextjs
- name: Checkout project repo
uses: actions/checkout@v4
with:
path: project-repo
repository: navapbc/platform-test-nextjs
token: ${{ secrets.PLATFORM_BOT_GITHUB_TOKEN }}
- 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 [email protected]
- name: Update application template
working-directory: project-repo
run: nava-platform app update --template-uri ${{ github.server_url }}/${{ github.repository }} --version HEAD . app
- name: Push changes to project repo
working-directory: project-repo
run: git push