Skip to content

Build and Deploy Website #42

Build and Deploy Website

Build and Deploy Website #42

Workflow file for this run

name: Build and Deploy Website
on:
workflow_dispatch:
inputs:
# trunk-ignore(checkov/CKV_GHA_7)
version:
description: Version to publish
required: true
type: string
concurrency:
group: pages
cancel-in-progress: true
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Replace version in Nuxt config
run: sed -i "s/<romm_version>/${{ github.event.inputs.version }}/g" components/AppHeader.vue
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
- name: Install dependencies
run: npm ci
- name: Static HTML export with Nuxt
run: npx nuxi build --preset github-pages
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./dist
deploy:
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4