ci: fixed linkcheck issues for Astro #8
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
| --- | |
| # ------------------------------------------------------------------------------------------------- | |
| # Job Name | |
| # ------------------------------------------------------------------------------------------------- | |
| name: Docs | |
| # ------------------------------------------------------------------------------------------------- | |
| # When to run | |
| # ------------------------------------------------------------------------------------------------- | |
| on: | |
| # Runs on Pull Requests | |
| pull_request: | |
| paths: | |
| - 'docs/**' | |
| # Runs on mainline Branch and Tags | |
| push: | |
| paths: | |
| - 'docs/**' | |
| branches: | |
| - mainline | |
| # ------------------------------------------------------------------------------------------------- | |
| # What to run | |
| # ------------------------------------------------------------------------------------------------- | |
| jobs: | |
| docs: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: | |
| - build | |
| - linkcheck | |
| name: "[Docs ${{ matrix.target }}]" | |
| steps: | |
| # ------------------------------------------------------------ | |
| # Checkout repository | |
| # ------------------------------------------------------------ | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Check documentation | |
| uses: devilbox-community/github-actions/.github/actions/shell-command-retry-action@master | |
| with: | |
| retries: 5 | |
| workdir: "${{ github.workspace }}/docs/" | |
| command: | | |
| make ${{ matrix.target }} | |
| # ------------------------------------------------------------------------------------------------ | |
| # Deploy built docs to GitHub Pages (mainline pushes only) | |
| # ------------------------------------------------------------------------------------------------ | |
| deploy: | |
| needs: docs | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/mainline' | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| name: "[Docs deploy to GitHub Pages]" | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Build documentation site | |
| uses: devilbox-community/github-actions/.github/actions/shell-command-retry-action@master | |
| with: | |
| retries: 5 | |
| workdir: "${{ github.workspace }}/docs/" | |
| command: | | |
| make build | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: docs/dist/ | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |