New Crowdin updates #193
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 Integrity | |
on: | |
pull_request: | |
paths: | |
- 'pages/**' | |
branches: | |
- main | |
jobs: | |
website-check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/cancel-workflow-action@0.9.1 | |
with: | |
access_token: ${{ github.token }} | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Fetch | |
run: git fetch origin main | |
- name: Set up env | |
uses: the-guild-org/shared-config/setup@main | |
with: | |
nodeVersion: 20 | |
packageManager: pnpm | |
- name: Build Site | |
run: pnpm build | |
- name: Compare | |
run: git diff origin/${{ github.base_ref }}.. -- website/route-lockfile.txt | |
- name: Diff to file | |
if: always() | |
id: diff_result | |
run: | | |
echo "result<<EOF" >> $GITHUB_OUTPUT | |
echo "$(git diff origin/${{ github.base_ref }}.. -- website/route-lockfile.txt)" >> $GITHUB_OUTPUT | |
echo EOF >> $GITHUB_OUTPUT | |
- name: Publish a message | |
if: always() && contains(steps.diff_result.outputs.result, 'diff') | |
uses: marocchino/sticky-pull-request-comment@v2 | |
with: | |
message: | | |
```diff | |
${{ steps.diff_result.outputs.result }} | |
``` |