Comon RCL library for demos (#364) #324
Workflow file for this run
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
name: Publish Documentation to Github Pages | |
on: | |
# Trigger the workflow on push, | |
# but only for the main branch | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
inputs: | |
prod_release: | |
description: 'Do you want to release to PROD' | |
required: true | |
default: false | |
type: boolean | |
jobs: | |
Build-Deploy-Documentation: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check 🛎️ | |
uses: actions/checkout@v2 | |
- name: Install Node 16 | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
- name: Build & Test Documentation | |
run: | | |
cd docs | |
if [ -e package-lock.json ]; then | |
npm ci | |
else | |
npm i | |
fi | |
npm run build | |
# Adding publshing content | |
- name: Publish Content | |
if: ${{ inputs.prod_release }} | |
env: | |
GIT_USER: ${{ secrets.GIT_USER }} | |
GIT_PASS: ${{ secrets.GIT_USER_TOKEN }} | |
run: | | |
cd docs | |
git config --global user.name "${{ secrets.GIT_USER }}" | |
git config --global user.email "${{ secrets.GIT_USER_EMAIL }}" | |
if [ -e package-lock.json ]; then | |
npm ci | |
else | |
npm i | |
fi | |
echo 'getblazorbootstrap.com' > CNAME | |
cat CNAME | |
npm run deploy |