feat: Implement IOC #1346
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
## | |
# Copyright (C) 2023-2024 Hedera Hashgraph, LLC | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
## | |
# Sample workflow for building and deploying a Hugo site to GitHub Pages | |
name: Deploy Hugo site to Pages | |
on: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# Runs on pushes targeting the default branch | |
push: | |
branches: | |
- main | |
paths: | |
- '**/*.mjs' | |
- '**/*.js' | |
- '**/*.ts' | |
- '**/package*.json' | |
- 'docs/content/User/*.md' | |
- 'DEV.md' | |
- 'README.md' | |
# run in the pull request, but don't publish | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
# Default to bash | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
# Build job | |
Build: | |
runs-on: solo-linux-medium | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | |
with: | |
egress-policy: audit | |
- name: Setup Hugo | |
uses: step-security/actions-hugo@8b2a237efc0653848b74551acf66bb9ddd5fa02e # v3.0.0 | |
with: | |
hugo-version: '0.124.1' | |
- name: Checkout Code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | |
with: | |
node-version: 20 | |
- name: Setup Pages | |
id: pages | |
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0 | |
with: | |
enablement: true | |
- name: Install Task | |
uses: arduino/setup-task@b91d5d2c96a56797b48ac1e0e89220bf64044611 # v2.0.0 | |
with: | |
version: 3.39.2 | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build with Hugo | |
run: | | |
cd docs | |
task default | |
# Upload the built site to GitHub Pages | |
- name: Upload Pages Artifact | |
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1 | |
if: ${{ endsWith(github.ref, 'main') }} | |
with: | |
path: ./docs/public | |
# Upload the built site to artifacts for troubleshooting or verification | |
- name: Upload Artifact | |
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 | |
if: ${{ !endsWith(github.ref, 'main') }} | |
with: | |
path: ./docs/public | |
# Deployment job | |
Deploy: | |
if: ${{ endsWith(github.ref, 'main') }} | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: solo-linux-medium | |
needs: Build | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | |
with: | |
egress-policy: audit | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 |