A mirror of my website's source code.

Important information: Google announced that, from September 2026, Android devices will require ALL apps to be signed by Google, effectively leading to an iOS situation. Value your right to a computer that does what you want; do not tolerate this monopolistic practice! Contact me if you don't understand why it is bad. Click to learn more.

I'm gonna try something different for the deploy step

by steve0greatness, Friday, 29 December 2023, 22:47:26 (1703890046), pushed by steve0greatness, Monday, 6 May 2024, 02:55:32 (1714964132)

Author identity: Steve0Greatness <75220768+Steve0Greatness@users.noreply.github.com>

4ffbaf014ed9c5c5c26b5bc6b2fab7643cacc531

.github/workflows/deploy.yml

@@ -20,9 +20,5 @@ jobs:

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                          with:
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                            path: "requirements.txt"
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                        # You can test your matrix by printing the current Python version
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    - name: Display Python version
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                      run: python build.py
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    - name: Deploy 🚀
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                      uses: JamesIves/github-pages-deploy-action@v4
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                      with:
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                        folder: build # The folder the action should deploy.
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    - name: Run Python Builder
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                      run: python build.py
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                            
                                

.gitignore

@@ -1,2 +1,2 @@

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            __pycache__
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        build/*
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        docs/*
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                            
                                

build.py

@@ -5,7 +5,7 @@ from os import mkdir as CreateDirectory, listdir as ListDirectory, unlink as Del

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            from os.path import isfile as IsFile, exists as PathExists
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            from distutils.dir_util import copy_tree as CopyDirectory
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        BUILD_DIRECTORY = "build"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        BUILD_DIRECTORY = "docs"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            def WipeFinalDir():
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                if not PathExists(BUILD_DIRECTORY):
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        

@@ -48,11 +48,16 @@ def RenderPage(PageInput: str, ContentDest: str, **kwargs):

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    DestLocation.write(RenderTemplate(PageInput, **kwargs))
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            if __name__ == "__main__":
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            print("Wiping directory")
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                WipeFinalDir()
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            print("Creating blog holder")
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                CreateDirectory(BUILD_DIRECTORY + "/blog")
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            print("Rendering posts...")
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                RenderPosts()
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            print("Copying static directory")
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                CopyDirectory("static", BUILD_DIRECTORY + "/static")
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            print("Building static files")
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                RenderPage("index.html", "index.html", PostList=PostList)
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                RenderPage("blog-list.html", "/blog/index.html", PostList=PostList)
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                RenderPage("blog-feed.rss", "/blog/feed.rss", PostList=PostList)