File tree Expand file tree Collapse file tree 3 files changed +112
-2
lines changed Expand file tree Collapse file tree 3 files changed +112
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : Update README with File Structure
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+
8
+ permissions :
9
+ contents : write
10
+
11
+ jobs :
12
+ update-readme :
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - name : Checkout repository
16
+ uses : actions/checkout@v2
17
+
18
+ - name : Update README.md
19
+ uses : actions/github-script@v6
20
+ with :
21
+ script : |
22
+ const { execSync } = require('child_process');
23
+ const fs = require('fs');
24
+
25
+ const fileStructure = execSync('cd app && tree').toString();
26
+
27
+ const readmePath = 'README.md';
28
+ let readmeContent = fs.readFileSync(readmePath, 'utf8');
29
+ readmeContent = readmeContent.replace(/## File Structure.*?(?=## |$)/s, '## File Structure\n```\n' + fileStructure + '```\n\n');
30
+ fs.writeFileSync(readmePath, readmeContent);
31
+
32
+ - uses : EndBug/add-and-commit@v9
33
+ with :
34
+ default_author : github_actions
Original file line number Diff line number Diff line change 1
- # FastAPI Template
1
+ # FastAPI
2
2
3
- ** Create a .env file based on .env.dist and make all the necessary customizations.**
3
+ ## File Structure
4
+ ```
5
+ .
6
+ ├── __init__.py
7
+ ├── api
8
+ │ ├── __init__.py
9
+ │ ├── deps.py
10
+ │ └── v1
11
+ │ ├── __init__.py
12
+ │ └── users
13
+ │ ├── __init__.py
14
+ │ ├── auth
15
+ │ │ ├── __init__.py
16
+ │ │ └── token.py
17
+ │ ├── create.py
18
+ │ └── retrieve.py
19
+ ├── core
20
+ │ ├── __init__.py
21
+ │ ├── db.py
22
+ │ ├── exps.py
23
+ │ └── settings.py
24
+ ├── logic
25
+ │ ├── __init__.py
26
+ │ ├── security
27
+ │ │ ├── __init__.py
28
+ │ │ ├── jwt.py
29
+ │ │ └── pwd.py
30
+ │ └── users
31
+ │ ├── __init__.py
32
+ │ ├── auth
33
+ │ │ ├── __init__.py
34
+ │ │ └── auth.py
35
+ │ └── users.py
36
+ ├── models
37
+ │ ├── __init__.py
38
+ │ ├── base.py
39
+ │ ├── token.py
40
+ │ └── user.py
41
+ └── repositories
42
+ ├── __init__.py
43
+ ├── abstract.py
44
+ └── user.py
45
+
46
+ 11 directories, 28 files
47
+ ```
48
+
49
+ ## Create a ` .env ` file based on ` .env.dist ` and make all the necessary customizations
4
50
5
51
### To run the application in a docker container, run the command
6
52
Original file line number Diff line number Diff line change
1
+ ## File Structure
2
+ .
3
+ ├── Dockerfile
4
+ ├── LICENSE
5
+ ├── Makefile
6
+ ├── README.md
7
+ ├── alembic.ini
8
+ ├── app
9
+ │ ├── __ init__ .py
10
+ │ ├── api
11
+ │ ├── core
12
+ │ ├── logic
13
+ │ ├── models
14
+ │ └── repositories
15
+ ├── docker-compose.yaml
16
+ ├── docs
17
+ │ ├── index.html
18
+ │ ├── openapi.json
19
+ │ └── swagger.html
20
+ ├── migrations
21
+ │ ├── README
22
+ │ ├── env.py
23
+ │ ├── script.py.mako
24
+ │ └── versions
25
+ ├── poetry.lock
26
+ ├── pyproject.toml
27
+ ├── requirements.txt
28
+ └── temp_structure.md
29
+
30
+ 9 directories, 17 files
You can’t perform that action at this time.
0 commit comments