Skip to content

docs(site): move repo to march25 #1989

docs(site): move repo to march25

docs(site): move repo to march25 #1989

Workflow file for this run

#*********************************************************************
# Copyright (c) Intel Corporation 2020
# SPDX-License-Identifier: Apache-2.0
#*********************************************************************/
# This is a basic workflow to help you get started with Actions
name: Docs-Build
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on:
push:
branches:
- main
pull_request:
branches: [main]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
permissions:
contents: read
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
permissions:
contents: write # for Git to git push
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: "3.11"
# Runs a single command using the runners shell
- name: Run a one-line script
run: |
pip install -r ./requirements.txt --require-hashes
mkdocs build --strict
#checkout the gh-pages branch
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
if: ${{ github.ref == 'refs/heads/main' }}
with:
path: "to-be-published"
ref: "gh-pages"
#copy the built site content
- name: Copy
if: ${{ github.ref == 'refs/heads/main' }}
run: cp -rlf site/* ./to-be-published/
#publish it
- name: Publish content
if: ${{ github.ref == 'refs/heads/main' }}
env:
MESSAGE: ${{github.event.head_commit.message}}
run: |
cd ./to-be-published
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git commit -m 'ci: ${{env.MESSAGE}}'
git push origin gh-pages