Skip to content

Instantly share code, notes, and snippets.

@cmckni3
Created January 31, 2024 04:49
Show Gist options
  • Save cmckni3/014b6a41096f0084861020f72a82b86e to your computer and use it in GitHub Desktop.
Save cmckni3/014b6a41096f0084861020f72a82b86e to your computer and use it in GitHub Desktop.
GitHub Actions GitHub Pages template
name: Deploy presentation to GitHub pages
on:
# Runs on pushes targeting the default branch
push:
branches: ["master"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build-and-deploy:
# Recommended if you intend to make multiple deployments in quick succession.
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: 8.x
- name: Install and Build 🔧
env:
BASE_HREF: /${{ github.event.repository.name }}/
run: |
echo "Installing dependencies"
yarn install
echo "Building presentation..."
yarn build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4.2.3
with:
branch: gh-pages
folder: dist
git-config-name: github-actions[bot]
git-config-email: github-actions[bot]@users.noreply.github.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment