Website Crawler #1396
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: Website Crawler | |
on: | |
# Manually select an env to deploy to | |
workflow_dispatch: | |
inputs: | |
deployment-env: | |
description: "Environment" | |
type: environment # will be prod, dev, dev-blue, or dev-green | |
required: true | |
default: dev | |
workflow_run: | |
workflows: | |
- "Deploy: main branch" | |
types: | |
- completed | |
jobs: | |
crawler: | |
name: Website Crawler | |
runs-on: ubuntu-latest | |
env: | |
url: ${{ inputs.deployment-env == 'prod' && 'https://www.mbta.com' || format('https://{0}.mbtace.com', inputs.deployment-env || 'dev') }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: erlef/setup-beam@v1 | |
with: | |
version-file: .tool-versions | |
version-type: strict | |
- name: Run Crawler | |
run: | | |
mix escript.install --force github mbta/link_checker | |
$HOME/.mix/escripts/crawler ${{ env.url }} --num-workers 3 |