-
Notifications
You must be signed in to change notification settings - Fork 1.4k
50 lines (41 loc) · 1.39 KB
/
website-integrity.yml
File metadata and controls
50 lines (41 loc) · 1.39 KB
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
name: Website Integrity
on:
pull_request:
paths:
- 'website/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
website-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Fetch
run: git fetch origin master
- name: Setup env
uses: the-guild-org/shared-config/setup@bcb53d910698d29749511f386139ad8180269101 # main
- name: Build Packages
run: yarn build
- name: Build Website
run: yarn workspace website run build
- name: Compare
run: git diff origin/${{ github.base_ref }}.. -- website/route-lockfile.txt
- name: Diff to file
if: always()
id: diff_result
run: |
OUTPUT=$(git diff origin/${{ github.base_ref }}.. -- website/route-lockfile.txt)
OUTPUT="${OUTPUT//'%'/'%25'}"
OUTPUT="${OUTPUT//$'\n'/'%0A'}"
OUTPUT="${OUTPUT//$'\r'/'%0D'}"
echo "::set-output name=result::$OUTPUT"
- name: Publish a message
if: always() && contains(steps.diff_result.outputs.result, 'diff')
uses: marocchino/sticky-pull-request-comment@70d2764d1a7d5d9560b100cbea0077fc8f633987 # v3
with:
message: |
```diff
${{ steps.diff_result.outputs.result }}
```