fix: ensure failure exit code is properly reported (#778) #484
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: Docs | |
| on: | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pages: write | |
| jobs: | |
| test: | |
| name: Test / OS ${{ matrix.platform }} / Node ${{ matrix.node }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: [ubuntu-24.04] | |
| node: ['20'] | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node- | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| - name: export docs | |
| run: | | |
| npm ci | |
| npm run docs:export | |
| env: | |
| ANON_KEY: ${{ secrets.ANON_KEY }} | |
| SERVICE_KEY: ${{ secrets.SERVICE_KEY }} | |
| TENANT_ID: ${{ secrets.TENANT_ID }} | |
| REGION: ${{ secrets.REGION }} | |
| POSTGREST_URL: ${{ secrets.POSTGREST_URL }} | |
| GLOBAL_S3_BUCKET: ${{ secrets.GLOBAL_S3_BUCKET }} | |
| PGRST_JWT_SECRET: ${{ secrets.PGRST_JWT_SECRET }} | |
| AUTHENTICATED_KEY: ${{ secrets.AUTHENTICATED_KEY }} | |
| DATABASE_URL: postgresql://postgres:[email protected]/postgres | |
| PGOPTIONS: -c search_path=storage,public | |
| FILE_SIZE_LIMIT: '52428800' | |
| STORAGE_BACKEND: s3 | |
| ENABLE_IMAGE_TRANSFORMATION: true | |
| - name: Generate Swagger UI | |
| uses: Legion2/swagger-ui-action@v1 | |
| with: | |
| output: swagger-ui | |
| spec-file: static/api.json | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: swagger-ui |