-
Notifications
You must be signed in to change notification settings - Fork 208
30 lines (25 loc) · 1.07 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: Site publish
on:
workflow_dispatch:
push:
branches:
- main
jobs:
site-build:
name: Build & publish site
runs-on: ubuntu-latest
# Run the job if manually triggered or if the commit message includes '#publish' & the check suite has passed
if: github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, '#publish')
steps:
- name: Checkout PR branch
uses: actions/checkout@v4
- name: Setup Job and Install Dependencies
uses: ./.github/actions/setup-job
- name: Generate Docs
run: yarn docs:ci
- name: Deploy to GitHub Pages
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
yarn gh-pages -d projects/documentation/dist -m "[skip ci] update demonstration site" -t -u "github-actions-bot <[email protected]>" --nojekyll
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}