linkcheck #1260
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: linkcheck | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '30 0 * * *' # Daily “At 00:30” | |
| pull_request: | |
| types: [labeled] # only runs on PR's with label `run-linkcheck` | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| if: ${{ github.event.label.name == 'run-linkcheck' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }} | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6.0.3 | |
| - name: set environment variables | |
| run: | | |
| echo "TODAY=$(date +%Y-%m-%d)" >> $GITHUB_ENV | |
| - name: environment setup | |
| id: env-setup | |
| continue-on-error: true | |
| uses: mamba-org/setup-micromamba@d7c9bd84e824b79d2af72a2d4196c7f4300d3476 # v3.0.0 | |
| with: | |
| environment-file: environment.yml | |
| cache-environment: true | |
| cache-environment-key: "build-${{env.TODAY}}" | |
| - name: retry environment set up if failed | |
| if: steps.env-setup.outcome == 'failure' | |
| uses: mamba-org/setup-micromamba@d7c9bd84e824b79d2af72a2d4196c7f4300d3476 # v3.0.0 | |
| with: | |
| download-micromamba: false | |
| environment-file: environment.yml | |
| cache-environment: true | |
| cache-environment-key: "build-${{env.TODAY}}" | |
| - name: Make docs with linkcheck | |
| uses: nick-fields/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4.0.0 | |
| with: | |
| timeout_minutes: 60 | |
| max_attempts: 3 | |
| command: | | |
| eval "$(micromamba shell hook --shell bash)" | |
| micromamba activate | |
| micromamba activate geocat-applications | |
| make linkcheck |