feat: astro instead of docusaurus for docs #6913
Workflow file for this run
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: CI | |
| on: [push, pull_request] | |
| jobs: | |
| get-build-packages: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| package-names: ${{ steps.set-matrix.outputs.package-names }} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - id: set-matrix | |
| uses: complete-ts/get-package-names@452871456b458acf4b8544205e3d8ef966061380 # v1 | |
| with: | |
| script-name: build | |
| build: | |
| needs: get-build-packages | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| package-name: ${{ fromJson(needs.get-build-packages.outputs.package-names) }} | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: ./.github/workflows/setup | |
| - working-directory: ./packages/${{ matrix.package-name }} | |
| run: npm run build | |
| - name: Store the docs build directory | |
| if: ${{ matrix.package-name == 'docs' }} | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: docs-build | |
| path: ./packages/docs/dist | |
| get-lint-packages: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| package-names: ${{ steps.set-matrix.outputs.package-names }} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - id: set-matrix | |
| uses: complete-ts/get-package-names@452871456b458acf4b8544205e3d8ef966061380 # v1 | |
| with: | |
| script-name: lint | |
| lint: | |
| needs: get-lint-packages | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| package-name: ${{ fromJson(needs.get-lint-packages.outputs.package-names) }} | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: ./.github/workflows/setup | |
| # https://github.com/astral-sh/setup-uv | |
| - uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 | |
| if: ${{ matrix.package-name == 'isaacscript-cli' }} | |
| - working-directory: ./packages/${{ matrix.package-name }} | |
| run: npm run lint | |
| get-test-packages: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| package-names: ${{ steps.set-matrix.outputs.package-names }} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - id: set-matrix | |
| uses: complete-ts/get-package-names@452871456b458acf4b8544205e3d8ef966061380 # v1 | |
| with: | |
| script-name: test | |
| test: | |
| needs: get-test-packages | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| package-name: ${{ fromJson(needs.get-test-packages.outputs.package-names) }} | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: ./.github/workflows/setup | |
| - working-directory: ./packages/${{ matrix.package-name }} | |
| # We specify custom Node.js options in order to increase the memory size, since GitHub | |
| # Actions can fail with the following error when doing the `eslint-plugin-isaacscript` | |
| # tests: | |
| # FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory | |
| run: NODE_OPTIONS='--max-old-space-size=8192' npm run test | |
| monorepo-lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: ./.github/workflows/setup | |
| - run: npm run lint | |
| docs-deploy: | |
| needs: [build, lint, test, monorepo-lint] | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: ./.github/workflows/setup | |
| - name: Retrieve the docs build directory | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: docs-build | |
| path: ./packages/docs/dist | |
| - name: Check if the "DOCS_SSH_PRIVATE_KEY" GitHub secret is set | |
| env: | |
| SECRET_CHECK: ${{ secrets.DOCS_SSH_PRIVATE_KEY }} | |
| if: ${{ env.SECRET_CHECK == '' }} | |
| run: | | |
| echo "Error: The GitHub secret of \"DOCS_SSH_PRIVATE_KEY\" is not set." | |
| exit 1 | |
| - name: Checkout the docs repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| ssh-key: ${{ secrets.DOCS_SSH_PRIVATE_KEY }} | |
| repository: IsaacScript/isaacscript.github.io | |
| ref: gh-pages | |
| path: isaacscript.github.io | |
| - name: Deploy the documentation website | |
| working-directory: ./packages/docs | |
| run: npm run deploy | |
| discord: | |
| name: Discord Failure Notification | |
| needs: [build, lint, test, monorepo-lint, docs-deploy] | |
| if: failure() | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: sarisia/actions-status-discord@eb045afee445dc055c18d3d90bd0f244fd062708 # v1.16.0 | |
| with: | |
| webhook: ${{ secrets.DISCORD_WEBHOOK }} | |
| status: failure | |
| title: "" |