Skip to content

Commit

Permalink
Create example-site.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
wyatt-herkamp committed Dec 24, 2023
1 parent 73e899e commit 46f2321
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/example-site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Deploy Example Site

on:
push:
branches: ["main"]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: '20.x'
- name: Build Main Library
run: npm install && npm run build
- name: Build Website
working-directory: example
run: npm install && npm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: "example/dist/"
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 46f2321

Please sign in to comment.