Migrate Lookbook preview classes from Flex to Strata namespace (#201) #245
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Update flex | |
| 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: cd | |
| jobs: | |
| deploy: | |
| name: Deploy | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| project: | |
| - repo: navapbc/pfml-starter-kit-app | |
| app: demo | |
| - repo: navapbc/community-engagement-medicaid | |
| app: reporting-app | |
| steps: | |
| - name: Checkout project repo | |
| uses: actions/checkout@v4 | |
| with: | |
| path: project-repo | |
| repository: ${{ matrix.project.repo }} | |
| token: ${{ secrets.PLATFORM_BOT_GITHUB_TOKEN }} | |
| - name: Configure git | |
| working-directory: project-repo | |
| run: | | |
| git config user.name nava-platform-bot | |
| git config user.email platform-admins@navapbc.com | |
| git config --global url."https://nava-platform-bot:${{ secrets.PLATFORM_BOT_GITHUB_TOKEN }}@github.com/navapbc/".insteadOf "https://github.com/navapbc/" | |
| # Get Ruby version manually from the .ruby-version file since working-directory is the project repo root rather than the app directory | |
| # so setup-ruby doesn't find the .ruby-version file automatically | |
| - name: Get Ruby version | |
| id: ruby-version | |
| working-directory: project-repo | |
| run: | | |
| echo "RUBY_VERSION=$(cat ${{ matrix.project.app }}/.ruby-version)" >> "$GITHUB_OUTPUT" | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ steps.ruby-version.outputs.RUBY_VERSION }} | |
| - name: Update flex | |
| working-directory: project-repo/${{ matrix.project.app }} | |
| run: | | |
| bundle install | |
| bundle update flex | |
| - name: Commit changes | |
| working-directory: project-repo | |
| run: | | |
| git add . | |
| git commit -m "Update flex to ${{ github.sha }}" || echo "No changes to commit" | |
| - name: Push changes to project repo | |
| working-directory: project-repo | |
| run: git push |