Skip to content

03-23-2024-docusarus-webmentions.md #84

03-23-2024-docusarus-webmentions.md

03-23-2024-docusarus-webmentions.md #84

name: Build and Deploy Website
on:
workflow_dispatch:
push:
branches: [ "main" ]
jobs:
build-blog:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: './package-lock.json'
- name: Install Dependencies
run: npm install
- name: Build Blog
run: npm run build
- name: Show files
shell: bash
run: |
ls -al
ls -al build
ls -al build/blog
touch build/.nojekyll
touch build/blog/.nojekyll
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: manic.so
path: build/*
upload-to-github-pages:
needs: [build-blog]
runs-on: ubuntu-latest
steps:
- name: Download Build Artifacts
uses: actions/download-artifact@v4
with:
path: github-pages
merge-multiple: true
seperate-directories: false
delete-merged: true
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v3
with:
name: github-pages
path: github-pages
deploy-to-github-pages:
needs: upload-to-github-pages
permissions:
pages: write
id-token: write
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