Markdown updates (#909) #555
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 | |
on: | |
# Trigger the workflow on push, | |
# but only for the main branch | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
inputs: | |
prod_release: | |
description: 'Do you want to release to production?' | |
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 'docs.blazorbootstrap.com' > CNAME | |
cat CNAME | |
npm run deploy |