chore: remove action to generate prep files for docs (#11475)
This commit is contained in:
@@ -1,60 +0,0 @@
|
|||||||
name: Generate Documentation Prep Files
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- www/apps/**
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
check_files:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: write # Required to push changes
|
|
||||||
steps:
|
|
||||||
- name: Cancel Previous Runs
|
|
||||||
uses: styfle/cancel-workflow-action@0.11.0
|
|
||||||
with:
|
|
||||||
access_token: ${{ github.token }}
|
|
||||||
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 2 # Ensures we can check the diff
|
|
||||||
ref: ${{ github.event.pull_request.head.ref }} # Checkout PR branch
|
|
||||||
|
|
||||||
- name: Setup Node.js environment
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
cache: "yarn"
|
|
||||||
|
|
||||||
- name: Install Workspace dependencies
|
|
||||||
working-directory: www
|
|
||||||
run: yarn install
|
|
||||||
|
|
||||||
- name: Build packages
|
|
||||||
working-directory: www
|
|
||||||
run: yarn build:packages
|
|
||||||
|
|
||||||
- name: Run yarn prep in book
|
|
||||||
working-directory: www/apps/book
|
|
||||||
run: yarn prep
|
|
||||||
|
|
||||||
- name: Run yarn prep in resources
|
|
||||||
working-directory: www/apps/resources
|
|
||||||
run: yarn prep
|
|
||||||
|
|
||||||
- name: Commit and push changes (if any)
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
|
||||||
run: |
|
|
||||||
git config --global user.name "Shahed Nasser"
|
|
||||||
git config --global user.email "shahednasser@gmail.com"
|
|
||||||
|
|
||||||
if [[ -n $(git status --porcelain www/apps/book/generated www/apps/book/public www/apps/resources/generated) ]]; then
|
|
||||||
echo "Ran prep and generated files, committing and pushing..."
|
|
||||||
git add www/apps/book/generated www/apps/book/public www/apps/resources/generated
|
|
||||||
git commit -m "chore: run yarn prep automatically"
|
|
||||||
git push origin ${{ github.event.pull_request.head.ref }}
|
|
||||||
else
|
|
||||||
echo "No generated files, skipping commit."
|
|
||||||
fi
|
|
||||||
Reference in New Issue
Block a user