Skip to content

chore: use contextmanager #4051

chore: use contextmanager

chore: use contextmanager #4051

Workflow file for this run

name: readme-update
permissions:
contents: write
on:
push:
pull_request:
types: [opened, synchronize, reopened]
release:
types: [published]
jobs:
deploy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Deploy
run: |
set -x
git fetch --depth=1 origin main website README
mkdir readme
cd readme
cp -fr ../.git .git
git checkout README
cp -fr ../.github .
rm .github/workflows/gh-pages.yml
rm .github/workflows/extension.yml
rm .github/workflows/readme.yml
rm .github/workflows/release.yml
rm .github/workflows/test.yml
cp ../README.md .
find . -maxdepth 1 -name "LICENSE*" -exec rm {} \;
find .. -maxdepth 1 -name "LICENSE*" -exec cp {} . \;
git add .
if git diff --cached --exit-code; then
exit 0
fi
git status
git config --global user.email "isamu@leafytree.jp"
git config --global user.name "[BOT] Isamu Mogi"
git commit -m "docs: update README to $GITHUB_SHA [BOT]"
case "$GITHUB_SHA" in
"$(git rev-parse origin/main)");;
"$(git rev-parse origin/website)");;
*) exit 0;;
esac
git push origin README