Skip to content

Build and Deploy

Build and Deploy #1

Workflow file for this run

name: Build and Deploy
on:
release:
types:
- released
workflow_dispatch:
inputs:
ref:
description: 'The git reference (tag) to build deploy.'
required: false
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v6
with:
ref: ${{ github.ref || github.event.inputs.ref }}
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v6
- name: Install dependencies
uses: bahmutov/npm-install@v1
- name: Build project
run: npm run build
- name: Upload production-ready build files
uses: actions/upload-artifact@v6
with:
name: production-files
path: ./dist
deploy:
name: Deploy
needs: Build
runs-on: ubuntu-latest
permissions:
pages: write
contents: write
steps:
- name: Download artifact
uses: actions/download-artifact@v7
with:
name: production-files
path: ./dist
- name: Setup CNAME file
run: echo "openorbiter.space" > ./dist/CNAME
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist