name: Publish templates on: workflow_dispatch: workflow_call: secrets: HUPPY_PRIVATE_KEY: required: true HUPPY_APP_ID: required: true DISCORD_DEPLOY_WEBHOOK_URL: required: false env: CI: 1 PRINT_GITHUB_ANNOTATIONS: 1 ALLOW_REFRESH_ASSETS_CHANGES: 1 defaults: run: shell: bash permissions: contents: read jobs: publish: name: Publish templates timeout-minutes: 60 runs-on: ubuntu-latest-16-cores-arm-open steps: - name: Check out code uses: actions/checkout@v6 with: persist-credentials: false - uses: ./.github/actions/setup - name: Generate a token id: generate_token uses: actions/create-github-app-token@v2 with: app-id: ${{ secrets.HUPPY_APP_ID }} private-key: ${{ secrets.HUPPY_PRIVATE_KEY }} owner: ${{ github.repository_owner }} - name: Configure git run: | git config --global user.name 'huppy-bot[bot]' git config --global user.email '128400622+huppy-bot[bot]@users.noreply.github.com' - name: Export templates env: GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} run: | cd templates all_templates=$(ls -d */ | cut -f1 -d'/') cd .. for template in $all_templates; do echo "::group::Exporting $template" yarn tsx ./internal/scripts/export-template.ts $template echo "::endgroup::" done - name: Notify Discord on failure if: failure() uses: ./.github/actions/discord-fail-notify with: webhook-url: ${{ secrets.DISCORD_DEPLOY_WEBHOOK_URL }}