File tree Expand file tree Collapse file tree 4 files changed +36
-3
lines changed Expand file tree Collapse file tree 4 files changed +36
-3
lines changed Original file line number Diff line number Diff line change @@ -18,10 +18,10 @@ jobs:
1818 pandoc docs/aoa.md -o docs/index.html
1919 - name : Commit and push changes
2020 run : |
21- git config --local user.name "許景企鵝 "
22- git config --local user.email "[email protected] " 21+ git config --local user.name "kevinlee-06 "
22+ git config --local user.email "[email protected] " 2323 git add docs/index.html
24- git commit -m "景夾已從 /docs/aoa.md 構建新的 /docs/index.html" || echo "景夾表示沒有改變 "
24+ git commit -m "已從 /docs/aoa.md 構建新的 /docs/index.html" || echo "沒有改變 "
2525 git push
2626 env :
2727 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1+ FROM python:3.9-slim
2+ WORKDIR /var/www/html
3+ RUN apt update
4+ RUN apt install -y pandoc tree
5+ RUN pip install Flask
6+ COPY docs .
7+ COPY assets ./assets
8+ COPY build .
9+ RUN pandoc aoa.md -o index.html
10+ EXPOSE 5000
11+ RUN tree .
12+ CMD ["python" , "app.py" ]
Original file line number Diff line number Diff line change 1+ from flask import Flask , send_from_directory
2+
3+ app = Flask (__name__ )
4+
5+ @app .route ('/' )
6+ def serve_index ():
7+ return send_from_directory ('.' , 'index.html' )
8+
9+ @app .route ('/assets/<path:filename>' )
10+ def serve_assets (filename ):
11+ return send_from_directory ('assets' , filename )
12+
13+ if __name__ == '__main__' :
14+ app .run (host = '0.0.0.0' , port = 5000 )
15+
Original file line number Diff line number Diff line change 1+ services :
2+ aoa-preview :
3+ build : .
4+ ports :
5+ - " 5000:5000"
6+
You can’t perform that action at this time.
0 commit comments