-
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 branch 'main' into feature/ソーシャルカードプラグインを導入する
- Loading branch information
Showing
17 changed files
with
795 additions
and
285 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
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,65 @@ | ||
--- | ||
# cSpell:ignore endgroup fjogeleit markdownlint pymdown softprops textlintignore textlintrc webapps | ||
|
||
name: ドキュメントのビルド(CI用) | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
paths: | ||
- "documents/**" | ||
- "iis-files/**" | ||
- "samples/**" | ||
- ".github/workflows/build-documents-ci.yml" | ||
- ".github/workflows/build-and-release-documents.yml" | ||
- ".github/workflows/lint-documents/action.yml" | ||
- ".github/workflows/compress-sample-source/action.yml" | ||
- ".github/workflows/build-documents/action.yml" | ||
- ".github/workflows/pack-and-upload/action.yml" | ||
- ".markdownlint.yaml" | ||
- ".textlintignore" | ||
- ".textlintrc" | ||
- ".yaml-lint.yml" | ||
- "package-lock.json" | ||
- "package.json" | ||
- "requirements.txt" | ||
workflow_dispatch: | ||
|
||
env: | ||
DOCUMENT_BASE_PATH: documents | ||
DOCUMENT_OUTPUT_FOLDER_NAME: build-artifacts | ||
DOCUMENT_ARTIFACTS_FILENAME: docs.zip | ||
COMPRESSED_SOURCE_PATH: contents/samples/downloads | ||
|
||
|
||
jobs: | ||
build: | ||
name: ドキュメントのビルド | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ブランチのチェックアウト | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: ドキュメントの Lint | ||
continue-on-error: true | ||
uses: ./.github/workflows/lint-documents | ||
|
||
- name: サンプルアプリケーションのソースコード圧縮 | ||
uses: ./.github/workflows/compress-sample-source | ||
with: | ||
compressed-source-path: ${{ env.DOCUMENT_BASE_PATH }}/${{ env.COMPRESSED_SOURCE_PATH }} | ||
|
||
- name: ドキュメントのビルド | ||
uses: ./.github/workflows/build-documents | ||
with: | ||
document-base-path: ${{ env.DOCUMENT_BASE_PATH }} | ||
output-folder-name: ${{ env.DOCUMENT_OUTPUT_FOLDER_NAME }} | ||
|
||
- name: ビルドアーティファクトのパッケージングとアップロード | ||
if: github.event_name == 'workflow_dispatch' | ||
uses: ./.github/workflows/pack-and-upload | ||
with: | ||
packaging-folder-path: ${{ env.DOCUMENT_BASE_PATH }}/${{ env.DOCUMENT_OUTPUT_FOLDER_NAME }} | ||
document-artifact-path: ${{ env.DOCUMENT_BASE_PATH }}/${{ env.DOCUMENT_ARTIFACTS_FILENAME }} |
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,74 @@ | ||
name: "ドキュメントのビルド" | ||
description: "ドキュメントをビルドします。" | ||
inputs: | ||
document-base-path: | ||
description: "ドキュメントのベースフォルダパス" | ||
required: true | ||
output-folder-name: | ||
description: "ビルドしたドキュメントの出力先フォルダ名" | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Python のセットアップ | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: pip パッケージのインストール | ||
shell: bash | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -r requirements.txt | ||
- name: ソーシャルカードプラグイン用のパッケージインストール | ||
shell: bash | ||
run: | | ||
python -m pip install "mkdocs-material[imaging]" | ||
sudo apt-get install pngquant | ||
- id: setup-version | ||
name: ドキュメントのバージョン設定 | ||
shell: bash | ||
run: | | ||
if [ ${{ startsWith(github.ref, 'refs/tags/v') }} ]; | ||
then | ||
export VERSION="${{ github.ref_name }}" | ||
else | ||
export VERSION="Test Version" | ||
fi | ||
- name: ドキュメントのビルド | ||
id: build_documents | ||
continue-on-error: true | ||
shell: bash | ||
run: | | ||
export BUILD_DOCUMENTS=true | ||
cd "${{ inputs.document-base-path }}" | ||
echo '# Mkdocs Build Result :factory:' >> $GITHUB_STEP_SUMMARY | ||
mkdocs build --verbose --clean --strict --site-dir "${{ inputs.output-folder-name }}" > mkdocs_build_log.txt | ||
- name: ドキュメントビルドの結果表示(成功) | ||
if: ${{ steps.build_documents.outcome == 'success' }} | ||
shell: bash | ||
run: | | ||
echo ':heavy_check_mark: mkdocs のビルドに成功しました。' >> $GITHUB_STEP_SUMMARY | ||
cd "${{ inputs.document-base-path }}" | ||
if [ -s mkdocs_build_log.txt ]; then | ||
echo '```' >> $GITHUB_STEP_SUMMARY | ||
cat mkdocs_build_log.txt >> $GITHUB_STEP_SUMMARY | ||
echo '```' >> $GITHUB_STEP_SUMMARY | ||
fi | ||
- name: ドキュメントビルドの結果表示(失敗) | ||
if: ${{ steps.build_documents.outcome == 'failure' }} | ||
shell: bash | ||
run: | | ||
echo ':x: mkdocs のビルドに失敗しました。' >> $GITHUB_STEP_SUMMARY | ||
cd "${{ inputs.document-base-path }}" | ||
if [ -s mkdocs_build_log.txt ]; then | ||
echo '```' >> $GITHUB_STEP_SUMMARY | ||
cat mkdocs_build_log.txt >> $GITHUB_STEP_SUMMARY | ||
echo '```' >> $GITHUB_STEP_SUMMARY | ||
fi | ||
exit 1 |
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,27 @@ | ||
name: "サンプルアプリケーションのソースコード圧縮" | ||
description: "サンプルアプリケーションのソースコードを圧縮します。" | ||
inputs: | ||
compressed-source-path: | ||
description: "圧縮したソースコードを配置するフォルダのGITHUB_WORKSPACEからの相対パス" | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: dressca.zip の作成 | ||
shell: bash | ||
run: | | ||
cd samples/Dressca | ||
zip -r ${GITHUB_WORKSPACE}/${{ inputs.compressed-source-path }}/dressca.zip * | ||
- name: console-app-with-di.zip の作成 | ||
shell: bash | ||
run: | | ||
cd samples/ConsoleAppWithDI | ||
zip -r ${GITHUB_WORKSPACE}/${{ inputs.compressed-source-path }}/console-app-with-di.zip * | ||
- name: azure-ad-b2c-auth.zip の作成 | ||
shell: bash | ||
run: | | ||
cd samples/AzureADB2CAuth | ||
zip -r ${GITHUB_WORKSPACE}/${{ inputs.compressed-source-path }}/azure-ad-b2c-auth.zip * |
Oops, something went wrong.