Files
LucasVbr/.github/workflows/deploy.yaml
T
Lucàs 9509510ee8 fix: Copy Readme file in workflow
Took 3 minutes
2025-07-14 01:05:48 +02:00

56 lines
1.2 KiB
YAML

name: Build and Commit README
on:
push:
branches: [dev]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Bun
uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Run build
run: bun run build
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Copy generated README.md to temp folder
run: |
mkdir -p tmp
cp README.md tmp/
- name: Switch to main branch
run: |
git fetch origin main
git checkout main
- name: Copy README.md from temp to main
run: |
cp tmp/README.md README.md
rm -rf tmp
- name: Commit README.md to main
run: |
if git diff --quiet README.md; then
echo "No changes to README.md"
else
git add README.md
git commit -m "chore(readme): update after build [CI]"
git push origin main
fi