Skip to content

➕ Add a dependency #93

➕ Add a dependency

➕ Add a dependency #93

name: Build & publish page
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: src
- uses: actions/checkout@v4
with:
path: live
ref: gh-pages
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20.0"
- name: Install dependencies
run: npm install
working-directory: src
- name: 🔨 Build
run: npm run build
working-directory: src
- name: 🔄 Prepare live copy
run: |
rm -rf live/* || true
touch live/.nojekyll
cp -r src/build/* live
- name: 🚀 Commit & deploy
if: github.repository == 'OctoPrint/bundleviewer.octoprint.org' && github.event_name != 'pull_request'
uses: EndBug/add-and-commit@v9
with:
cwd: "live"
message: "deploy: ${{ github.sha }}"
default_author: github_actions