Skip to content

Hotfix for workspace button panel #25

Hotfix for workspace button panel

Hotfix for workspace button panel #25

Workflow file for this run

name: build-site
on:
# Triggers the workflow on push events but only for the "main" branch
push:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checks out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
lfs: true
# Sets up a recent version of Node.js
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
# Build site with webpack
- name: Build static site
run: |
npm install
BASE_URL=/ npm run build:bundle
touch $GITHUB_WORKSPACE/dist/.nojekyll
echo "elucidateme.org" > dist/CNAME
# Emit JSON endpoint indicating job success (accessing via API is complicated)
- name: JSON endpoint on success
if: ${{ success() }}
run: python -c 'import json; print(json.dumps(dict(schemaVersion=1, label="build-site", style="for-the-badge", namedLogo="github", message="success", color="green")))' > $GITHUB_WORKSPACE/dist/endpoint.json
# Emit JSON endpoint indicating job failure (accessing via API is complicated)
- name: JSON endpoint on failure
if: ${{ failure() }}
run: python -c 'import json; print(json.dumps(dict(schemaVersion=1, label="build-site", style="for-the-badge", namedLogo="github", message="failure", color="red")))' > $GITHUB_WORKSPACE/dist/endpoint.json
# Push all the new assets to the pages branch
- name: Push to Github Pages branch
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: gh-pages
FOLDER: dist
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MESSAGE: "Build ({sha}): {msg}"