Skip to content

Deploy and build site #27

Deploy and build site

Deploy and build site #27

Workflow file for this run

name: Deploy and build site
on:
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Git
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Setup Node
uses: actions/setup-node@26961cf329f22f6837d5f54c3efd76b480300ace # v4
with:
node-version: '20.x'
- name: Build
run: node build/index.js
- name: List Site (build)
run: echo Site files && echo | ls site/
- name: Write Artifact
uses: actions/upload-artifact@v4
with:
name: build-output
path: site/
retention-days: 0.05
artifact:
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
env:
GITHUB_TOKEN: ${{ github.token }}
runs-on: ubuntu-latest
steps:
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: build-output
path: _site/
- name: Cleanup Build Artifact
uses: jimschubert/delete-artifacts-action@v1
with:
artifact_name: build-output
- name: List Site (deploy)
run: echo Site files && echo | ls _site/
- name: Deploy GitHub Pages site
uses: crazy-max/ghaction-github-pages@c05ee637ec73429400a359430db8e5629f3f2564 #v4
with:
build_dir: _site/
verbose: true