feat: renovate deps in gh workflows #2466
Workflow file for this run
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 | |
on: | |
push: | |
branches: | |
- 'main' | |
- 'release-**' | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- ready_for_review | |
branches: | |
- 'main' | |
- 'release-**' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
changes: | |
outputs: | |
should-run-link-check: ${{ steps.changes.outputs.src == 'true' }} | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 | |
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3 | |
id: changes | |
with: | |
filters: | | |
src: | |
- '**.js' | |
- 'pnpm-lock.yaml' | |
- 'package.json' | |
- '.github/workflows/website.yml' | |
# Check that the website builds and there's no missing links. | |
# This job builds the website, starts a server to serve it, and then uses | |
# muffet (https://github.com/raviqqe/muffet) to perform the link check. | |
link-check: | |
needs: [changes] | |
if: github.event.pull_request.draft == false && needs.changes.outputs.should-run-link-check == 'true' | |
name: Website Link Check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 | |
- uses: wyvox/action-setup-pnpm@6597ef5c1300fe08efa6bc75e6141f7153e2b4cc # v3 | |
with: | |
node-version: 20 | |
- name: run http-server | |
env: | |
# renovate: datasource=github-releases depName=raviqqe/muffet | |
MUFFET_VERSION: 2.9.3 | |
run: | | |
# install raviqqe/muffet to check for broken links. | |
curl -Ls https://github.com/raviqqe/muffet/releases/download/v${MUFFET_VERSION}/muffet_linux_amd64.tar.gz | tar -xz | |
# build site | |
pnpm install | |
pnpm website:build | |
# start http-server for integration testing | |
npx http-server runatlantis.io/.vuepress/dist & | |
- name: Run Playwright E2E tests | |
run: | | |
pnpx playwright install --with-deps | |
pnpm run e2e | |
- name: wait until server listened | |
run: curl --retry-delay 1 --retry 30 --retry-all-error http://localhost:8080 | |
# medium.com => was being rate limited: HTTP 429 | |
- run: | | |
./muffet \ | |
-e 'https://medium.com/runatlantis' \ | |
-e 'https://github\.com/runatlantis/atlantis/edit/main/.*' \ | |
-e 'https://github.com/runatlantis/helm-charts#customization' \ | |
-e 'https://github.com/sethvargo/atlantis-on-gke/blob/master/terraform/tls.tf#L64-L84' \ | |
-e 'https://confluence.atlassian.com/*' \ | |
--header 'Accept-Encoding:deflate, gzip' \ | |
--buffer-size 8192 \ | |
http://localhost:8080/ | |
skip-link-check: | |
needs: [changes] | |
if: needs.changes.outputs.should-run-link-check == 'false' | |
name: Website Link Check | |
runs-on: ubuntu-latest | |
steps: | |
- run: 'echo "No build required"' |