mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-07-29 10:58:27 +00:00
103 lines
2.9 KiB
YAML
103 lines
2.9 KiB
YAML
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-website-check: ${{ steps.changes.outputs.src == 'true' }}
|
|
if: github.event.pull_request.draft == false
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
|
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
|
|
id: changes
|
|
with:
|
|
filters: |
|
|
src:
|
|
- 'runatlantis.io/**'
|
|
- 'package-lock.json'
|
|
- 'package.json'
|
|
- '.github/workflows/website.yml'
|
|
|
|
# Check that the website builds and there's no missing links.
|
|
website-check:
|
|
needs: [changes]
|
|
if: github.event.pull_request.draft == false && needs.changes.outputs.should-run-website-check == 'true'
|
|
name: Website Check
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
|
|
|
- name: markdown-lint
|
|
uses: DavidAnson/markdownlint-cli2-action@05f32210e84442804257b2a6f20b273450ec8265 # v19
|
|
with:
|
|
config: .markdownlint.yaml
|
|
globs: 'runatlantis.io/**/*.md'
|
|
|
|
- name: Link Checker
|
|
id: lychee
|
|
uses: lycheeverse/lychee-action@f613c4a64e50d792e0b31ec34bbcbba12263c6a6 # v2.3.0
|
|
with:
|
|
args: --verbose --no-progress ./runatlantis.io
|
|
|
|
- name: setup npm
|
|
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
|
|
with:
|
|
node-version: '20'
|
|
cache: 'npm'
|
|
|
|
- name: run http-server
|
|
run: |
|
|
# build site
|
|
npm install
|
|
npm run website:build
|
|
|
|
# start http-server for integration testing
|
|
npx http-server runatlantis.io/.vitepress/dist &
|
|
|
|
- name: Run Playwright E2E tests
|
|
run: |
|
|
npx playwright install --with-deps
|
|
npm run e2e
|
|
|
|
skip-website-check:
|
|
needs: [changes]
|
|
if: needs.changes.outputs.should-run-website-check == 'false'
|
|
name: Website Check
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- run: 'echo "No build required"'
|