Skip to content

Instantly share code, notes, and snippets.

@David7ce
Created November 6, 2023 18:52
Show Gist options
  • Save David7ce/fa32883de5e88ecc5319ffc6b6d8954d to your computer and use it in GitHub Desktop.
Save David7ce/fa32883de5e88ecc5319ffc6b6d8954d to your computer and use it in GitHub Desktop.
Deploy Digital Garden to GitHub Pages with this workflow
name: GH Pages
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install
- run: npm run build --if-present
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./dist
github_token: ${{ secrets.GH_TOKEN }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment