Skip to content

Commit

Permalink
Merge pull request #22 from ppokrovskii/prod-workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ppokrovskii authored May 25, 2024
2 parents e13bf89 + f1251b4 commit 57ebf42
Show file tree
Hide file tree
Showing 6 changed files with 201 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/azure-staticwebapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ name: Deploy web app to Azure Static Web Apps

on:
push:
branches: [ "develop" ]
branches: [ "main", "develop" ]
paths: ["landing/**" ]
# pull_request:
# types: [opened, synchronize, reopened, closed]
Expand All @@ -26,6 +26,7 @@ env:
# API_LOCATION: "api" # location of your api source code - optional
APP_ARTIFACT_LOCATION: "build" # location of client code build output
AZURE_STATIC_WEB_APPS_API_TOKEN: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }} # secret containing deployment token for your static web app
REACT_APP_GOOGLE_ANALYTICS_KEY: ${{ secrets.REACT_APP_GOOGLE_ANALYTICS_KEY }}

permissions:
contents: read
Expand All @@ -37,7 +38,7 @@ jobs:
pull-requests: write # for Azure/static-web-apps-deploy to comment on PRs
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
environment: dev
environment: ${{ github.ref == 'refs/heads/main' && 'prod' || 'dev' }} # Set the github actions environment name to pick secrets from
name: Build and Deploy Job
steps:
- uses: actions/checkout@v4
Expand Down
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
*.env*
.idea/
.vscode
__azurite_db*__.json
__blobstorage__
__queuestorage__
local.settings.json
.venv
**/__pycache__/
*.tfvars
**/.terraform/
*terraform.tfstate*
**/node_modules/
135 changes: 135 additions & 0 deletions azfunctions/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don’t work, or not
# install all needed dependencies.
#Pipfile.lock

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# Azure Functions artifacts
bin
obj
appsettings.json
local.settings.json

# Azurite artifacts
__blobstorage__
__queuestorage__
__azurite_db*__.json
.python_packages
23 changes: 23 additions & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
5 changes: 4 additions & 1 deletion infra/runtime/storage_account.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# Create Blob Storage
resource "azurerm_storage_account" "storage" {
name = "${var.project_name}${terraform.workspace}storage"
name = "${var.project_name}storage"
resource_group_name = azurerm_resource_group.rg.name
location = azurerm_resource_group.rg.location
account_tier = "Standard"
account_replication_type = "LRS" # Locally redundant storage
tags = {
environment = "${terraform.workspace}"
}
}


Expand Down
23 changes: 23 additions & 0 deletions landing/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

0 comments on commit 57ebf42

Please sign in to comment.