generated from ks6088ts/template-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from ks6088ts-labs/feature/issue-8_gh-pages
add github pages
- Loading branch information
Showing
8 changed files
with
655 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: github-pages | ||
on: | ||
push: | ||
branches: | ||
- main | ||
permissions: | ||
contents: write | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Configure Git Credentials | ||
run: | | ||
git config user.name github-actions[bot] | ||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.x | ||
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | ||
- uses: actions/cache@v4 | ||
with: | ||
key: mkdocs-material-${{ env.cache_id }} | ||
path: .cache | ||
restore-keys: | | ||
mkdocs-material- | ||
- run: pip install mkdocs-material | ||
- run: mkdocs gh-deploy --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,19 @@ | ||
# References | ||
# workshop-azure-iot | ||
|
||
## Azure Functions | ||
This repository is for a workshop using Azure IoT services. | ||
|
||
Run the function app locally | ||
## Prerequisites | ||
|
||
```shell | ||
# Run the function app locally with the Azure Functions Core Tools | ||
$ poetry run func start | ||
``` | ||
To run all the projects in this repository, you need the followings. | ||
|
||
Deploy the function app to Azure | ||
- [Python 3.10+](https://www.python.org/downloads/) | ||
<!-- add services here --> | ||
|
||
```shell | ||
# Deploy resources to Azure | ||
$ bash scripts/deploy_azure_functions_resources.sh | ||
Here are the preferred tools for development. | ||
|
||
$ export FUNCTION_APP_NAME="CHANGE_ME" | ||
- [Poetry](https://python-poetry.org/docs/#installation) | ||
- [GNU Make](https://www.gnu.org/software/make/) | ||
|
||
# Publish the function app to Azure | ||
$ bash scripts/publish_azure_functions.sh | ||
``` | ||
## Scenarios | ||
|
||
### References | ||
|
||
- [Using FastAPI Framework with Azure Functions](https://learn.microsoft.com/en-us/samples/azure-samples/fastapi-on-azure-functions/fastapi-on-azure-functions/) | ||
- [Azure IoT Hub Messaging](scenarios/1_azure_iot_hub_messaging) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# References | ||
|
||
## Azure Functions | ||
|
||
Run the function app locally | ||
|
||
```shell | ||
# Run the function app locally with the Azure Functions Core Tools | ||
$ poetry run func start | ||
``` | ||
|
||
Deploy the function app to Azure | ||
|
||
```shell | ||
# Deploy resources to Azure | ||
$ bash scripts/deploy_azure_functions_resources.sh | ||
|
||
$ export FUNCTION_APP_NAME="CHANGE_ME" | ||
|
||
# Publish the function app to Azure | ||
$ bash scripts/publish_azure_functions.sh | ||
``` | ||
|
||
### References | ||
|
||
- [Using FastAPI Framework with Azure Functions](https://learn.microsoft.com/en-us/samples/azure-samples/fastapi-on-azure-functions/fastapi-on-azure-functions/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# yaml-language-server: $schema=https://squidfunk.github.io/mkdocs-material/schema.json | ||
site_name: Workshop for Azure IoT | ||
site_url: "" | ||
repo_url: https://github.com/ks6088ts-labs/workshop-azure-iot | ||
repo_name: ks6088ts-labs/workshop-azure-iot | ||
nav: | ||
- Home: index.md | ||
- Scenarios: | ||
- 1. Azure IoT Hub Messaging: scenarios/1_azure_iot_hub_messaging.md | ||
theme: | ||
name: material | ||
# https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#automatic-light-dark-mode | ||
palette: | ||
# Palette toggle for automatic mode | ||
- media: "(prefers-color-scheme)" | ||
toggle: | ||
icon: material/brightness-auto | ||
name: Switch to light mode | ||
|
||
# Palette toggle for light mode | ||
- media: "(prefers-color-scheme: light)" | ||
scheme: default | ||
toggle: | ||
icon: material/brightness-7 | ||
name: Switch to dark mode | ||
|
||
# Palette toggle for dark mode | ||
- media: "(prefers-color-scheme: dark)" | ||
scheme: slate | ||
toggle: | ||
icon: material/brightness-4 | ||
name: Switch to system preference | ||
icon: | ||
repo: fontawesome/brands/github | ||
language: en | ||
extra: | ||
social: | ||
- icon: fontawesome/brands/linkedin | ||
link: https://www.linkedin.com/in/ks6088ts/ | ||
- icon: fontawesome/brands/github | ||
link: https://github.com/ks6088ts | ||
- icon: fontawesome/brands/x-twitter | ||
link: https://x.com/ks6088ts | ||
analytics: | ||
provider: google | ||
property: G-0ZTKFXVQ5K |
Oops, something went wrong.