-
Notifications
You must be signed in to change notification settings - Fork 1.1k
105 lines (90 loc) · 2.93 KB
/
website.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
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
permissions:
# Required: allow read access to the content for analysis.
contents: read
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@c6295a65d1254861815972266d5933fd6e532bdf # v2.11.1
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@c6295a65d1254861815972266d5933fd6e532bdf # v2.11.1
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@1d97d84f0bc547f7b25f4c2170d87d810dc2fb2c # v2.4.0
with:
args: --verbose --no-progress ./runatlantis.io
- name: setup npm
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4
with:
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@c6295a65d1254861815972266d5933fd6e532bdf # v2.11.1
with:
egress-policy: audit
- run: 'echo "No build required"'