fix: change reports limit in GraphQL query #518
This file contains 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: Preview | |
on: | |
issue_comment: | |
types: [created] | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
outputs: | |
triggered: ${{ steps.check.outputs.triggered }} | |
steps: | |
- uses: Rei-x/pull-request-preview-action/comment@main | |
id: check | |
with: | |
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} | |
run-preview: | |
runs-on: ubuntu-latest | |
needs: [check] | |
if: ${{ needs.check.outputs.triggered == 'true' }} | |
concurrency: | |
group: ${{ github.event.issue.number }} | |
cancel-in-progress: true | |
steps: | |
- uses: Rei-x/pull-request-preview-action/start-preview@main | |
id: tunnel-url | |
with: | |
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} | |
ports: 3000 | |
- name: Add info about build | |
uses: marocchino/sticky-pull-request-comment@v2 | |
with: | |
append: true | |
number: ${{ github.event.issue.number }} | |
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} | |
message: | | |
**🖼️ Preview Environment:** _Installing dependencies..._ | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Setup yarn | |
run: yarn set version 3.6.1 | |
- name: Install deps | |
uses: ./.github/actions/yarn-install | |
- name: Setup GitHub Actions cache for Turbo | |
uses: dtinth/setup-github-actions-caching-for-turbo@v1 | |
with: | |
cache-prefix: parliamentary_ | |
- name: Add info about build | |
uses: marocchino/sticky-pull-request-comment@v2 | |
with: | |
append: true | |
number: ${{ github.event.issue.number }} | |
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} | |
message: | | |
**🖼️ Preview Environment:** _Building app..._ | |
- name: Build app | |
run: | | |
cd apps/web | |
touch .env.local | |
echo NEXT_PUBLIC_API_URL="${{ vars.NEXT_PUBLIC_API_URL }}" >> .env.local | |
echo NEXT_PUBLIC_OAUTH_DOMAIN="${{ vars.NEXT_PUBLIC_OAUTH_DOMAIN }}" >> .env.local | |
echo NEXT_PUBLIC_USOS_BASE_URL="${{ vars.NEXT_PUBLIC_USOS_BASE_URL }}" >> .env.local | |
echo NEXT_PUBLIC_USOS_SCOPES="${{ vars.NEXT_PUBLIC_USOS_SCOPES }}" >> .env.local | |
echo NEXT_PUBLIC_USOS_FIELDS="${{ vars.NEXT_PUBLIC_USOS_FIELDS }}" >> .env.local | |
echo NEXTAUTH_URL="${{ steps.tunnel-url.outputs.url-1 }}" >> .env.local | |
echo NEXTAUTH_SECRET="${{ secrets.NEXTAUTH_SECRET }}" >> .env.local | |
echo USOS_CLIENT_ID="${{ secrets.USOS_CLIENT_ID }}" >> .env.local | |
echo USOS_CLIENT_SECRET="${{ secrets.USOS_CLIENT_SECRET }}" >> .env.local | |
echo NODE_ENV="production" >> .env.local | |
cd ../.. | |
yarn build --filter=web | |
- name: Add info about starting app | |
uses: marocchino/sticky-pull-request-comment@v2 | |
with: | |
append: true | |
number: ${{ github.event.issue.number }} | |
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} | |
message: | | |
**🖼️ Preview Environment:** _Launching app..._ | |
- name: Start app | |
run: yarn start --filter=web & | |
- uses: Rei-x/pull-request-preview-action/end-preview@main | |
with: | |
url: ${{ steps.tunnel-url.outputs.url-1 }} | |
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} | |
- name: Close comment | |
uses: marocchino/sticky-pull-request-comment@v2 | |
if: success() | |
with: | |
number: ${{ github.event.issue.number }} | |
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} | |
message: | | |
🖼️ Preview Environment exceeded the maximum time of 60 minutes. | |
To start it again, comment `/preview` on this PR. | |
- name: Close comment when cancelled | |
uses: marocchino/sticky-pull-request-comment@v2 | |
if: cancelled() | |
with: | |
number: ${{ github.event.issue.number }} | |
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} | |
message: | | |
🖼️ Preview Environment was cancelled (because of newer preview or manual cancellation). | |
To start it again, comment `/preview` on this PR. | |
- name: Close comment when failed | |
uses: marocchino/sticky-pull-request-comment@v2 | |
if: failure() | |
with: | |
number: ${{ github.event.issue.number }} | |
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} | |
message: | | |
🖼️ Preview Environment failed to start. You can see more info here [GitHub Action](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}). | |
To start it again, comment `/preview` on this PR. |