Skip to content

Instantly share code, notes, and snippets.

@FabianHertwig
FabianHertwig / test_temporary_file.py
Created February 18, 2021 17:52
Python unittest with a temporary directory where a file gets written to it. TearDown deletes the directory and contents. To make pathlibs Path work, use Path(temp_dir.name).
from pathlib import Path
import tempfile
import unittest
class TestTempDirectory(unittest.TestCase):
def setUp(self) -> None:
self.temp_dir = tempfile.TemporaryDirectory()
@FabianHertwig
FabianHertwig / Deploy Angular 8 App as Azure Web App with Github Actions.md
Last active August 13, 2023 11:57
Deploy Angular 8 App as Azure Web App with Github Actions

I recently wanted to setup continious deployment of an Angular 8 project as an Azure Web App with Github Actions and strugeled a bit. It turns out the devil is in the details, so I provide this gist to hopefully make it easier for others.

Create an angular project, if you have none

Assuming you have the angular cli installed run the following command and use all the default settings.

ng new your-app-name

Create an Azure Web App