Skip to content

Build and Trigger Deploy #53

Build and Trigger Deploy

Build and Trigger Deploy #53

Workflow file for this run

name: Build and Trigger Deploy
on:
push:
branches:
- main
paths-ignore:
- .github/**
- .vscode/**
- .devcontainer/**
- .gitignore
workflow_dispatch:
repository_dispatch:
types:
- content_changed
jobs:
Build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Install dependencies
run: npm install
- name: Restore content from cache
uses: actions/cache/restore@v4
with:
restore-keys: content-
path: cache/
key: "_"
- name: Build project
run: npm run build
env:
GITHUB_TOKEN: ${{ secrets.PRIVILEGED_GITHUB_TOKEN }}
- name: Add .nojekyll file
run: touch dist/.nojekyll
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v4
with:
target_branch: gh-pages
build_dir: dist
env:
GITHUB_TOKEN: ${{ secrets.PRIVILEGED_GITHUB_TOKEN }}