如何在大型代码仓库中删掉 6w 行废弃的文件和 exports? #255
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: Generate GitBlog README | |
on: | |
workflow_dispatch: | |
issues: | |
types: [opened, edited] | |
issue_comment: | |
types: [created, edited] | |
push: | |
branches: | |
- master | |
paths: | |
- main.py | |
env: | |
GITHUB_NAME: sl1673495 | |
GITHUB_EMAIL: 949589855@qq.com | |
jobs: | |
sync: | |
name: Generate README | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.10.12 | |
- name: Configure pip cache | |
uses: actions/cache@v1 | |
id: pip-cache | |
with: | |
path: venv | |
key: pip-1-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
pip- | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m venv venv | |
source venv/bin/activate | |
pip install -r requirements.txt | |
if: steps.pip-cache.outputs.cache-hit != 'true' | |
- name: Generate new md | |
run: | | |
source venv/bin/activate | |
python main.py ${{ secrets.G_T }} ${{ github.repository }} --issue_numbe '${{ github.event.issue.number }}' | |
# - name: Use Node.js 12.x | |
# uses: actions/setup-node@v1 | |
# with: | |
# node-version: 12.x | |
# - run: yarn | |
# - run: yarn build | |
# env: | |
# CI: true | |
- name: Issue sync | |
uses: eunjae-lee/issue-to-markdown@v1 | |
with: | |
token: ${{ secrets.G_T }} | |
dest: 'src/pages_test' | |
- name: Push README | |
uses: github-actions-x/commit@v2.9 | |
with: | |
github-token: ${{ secrets.G_T }} | |
commit-message: 'Refresh README and pages' | |
files: . | |
# files: README.md | |
rebase: 'true' | |
name: ${{ env.GITHUB_NAME }} | |
email: ${{ env.GITHUB_EMAIL }} | |
# - name: Vercel Action | |
# id: vercel-action | |
# uses: amondnet/vercel-action@v20.0.0 | |
# with: | |
# github-token: ${{ secrets.GITHUB_TOKEN }} | |
# vercel-token: ${{ secrets.VERCEL_TOKEN }} | |
# vercel-args: '--prod' | |
# github-comment: false | |
# vercel-org-id: ${{ secrets.NOW_ORG_ID }} | |
# vercel-project-id: ${{ secrets.NOW_PROJECT_ID_STATIC }} | |
# working-directory: ./public | |
# - name: preview-url | |
# run: | | |
# echo 发布成功:${{ steps.vercel-action.outputs.preview-url }} |