Added files to trigger the GitHub pages workflow (#213)

# Pull Request

## 📖 Description

<!--- Provide some background and a description of your work. -->
This change adds the docs folder files to the gitignore, except the README for ease of local development. It also adds a GitHub workflow to trigger against `main` branch merges (and manual triggers) that will release of the documentation site.

This should be merged after #212 

##  Checklist

### General

<!--- Review the list and put an x in the boxes that apply. -->

- [ ] I have added tests for my changes.
- [x] I have tested my changes.
- [x] I have updated the project documentation to reflect my changes.
This commit is contained in:
Jane Chu 2022-04-18 17:27:36 -07:00 коммит произвёл GitHub
Родитель a77bc0ba00
Коммит 99e41eb8ab
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 61 добавлений и 0 удалений

52
.github/workflows/cd-gh-pages.yml поставляемый Normal file
Просмотреть файл

@ -0,0 +1,52 @@
name: Deploy GitHub Pages
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: [16.x]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Cache multiple paths
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Install Dependencies
run: npm ci
- name: Build
run: npm run build --if-present
- name: Build GitHub Pages
run: npm run build:gh-pages -w website
- name: Deploy GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4.3.0
with:
branch: gh-pages # The branch the action should deploy to.
folder: docs # The folder the action should deploy.

6
.gitignore поставляемый
Просмотреть файл

@ -61,3 +61,9 @@ temp/
# Ignore Build Artefacts
bin/
obj/
# Ignore the docs folder
docs/*
# Except the docs folder README
!docs/README.md

3
docs/README.md Normal file
Просмотреть файл

@ -0,0 +1,3 @@
# Description
This folder contains the statically generated documentation site, intended for use by GitHub pages. Aside from this README.md file, all files in this folder are automatically generated by files in the website/ folder.