Skip to content

Correct css.sass warnings (#754) #587

Correct css.sass warnings (#754)

Correct css.sass warnings (#754) #587

Workflow file for this run

name: Publish Site
on:
workflow_dispatch:
push:
branches:
- main
- 'website/**'
env:
OUTPUT_DIR: site-docs/
jobs:
publish-site:
name: Publish Site
runs-on: ubuntu-latest
env:
DART_SASS_VERSION: 1.98.0
permissions:
contents: write
id-token: write
pull-requests: write
steps:
- name: Get OCMBot installation token
# Instead of creating the PR below with GITHUB_TOKEN use a generated
# short-lived App installation token with full REST rights
id: generate_token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a #v2
with:
app_id: ${{ secrets.OCMBOT_APP_ID }}
private_key: ${{ secrets.OCMBOT_PRIV_KEY }}
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v4
- name: Setup Node.js
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 #v4
with:
node-version: 25.5.0 # keep in sync with 'engines'@package.json und Netlify
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.155.0'
extended: true
# For the installation of dart sass follow https://gohugo.io/functions/css/sass/#dart-sass and
# https://gohugo.io/host-and-deploy/host-on-github-pages/
- name: Create directory for user-specific executable files
run: mkdir -p "${HOME}/.local"
- name: Install Dart Sass
run: |
curl -sLJO "https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz"
tar -C "${HOME}/.local" -xf "dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz"
rm "dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz"
echo "${HOME}/.local/dart-sass" >> "${GITHUB_PATH}"
- name: Install deps and Build
run: |
npm ci
npm run build
- name: Setup Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c #v5
with:
python-version: '3.11'
- name: Generate Schema
run: |
python3 -m pip install json-schema-for-humans
generate-schema-doc --config-file generate-schema.yaml static/schemas/component-descriptor-v2 schema-v2.html
- name: Copy Schema
run: |
mkdir -p public/docs/overview/specification
cp schema-v2.html schema_doc.css schema_doc.min.js public/docs/overview/specification
- name: Publish as GitHub Pages
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e #v4
with:
github_token: ${{ steps.generate_token.outputs.token }}
publish_dir: ./public
commit_message: ${{ github.event.head_commit.message }}
user_name: 'GitHub Actions Bot'
user_email: '<41898282+github-actions[bot]@users.noreply.github.com>'