Skip to content

Commit

Permalink
deploy: to gh pages
Browse files Browse the repository at this point in the history
  • Loading branch information
aszenz committed Oct 6, 2024
1 parent e694540 commit f5999e2
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 1 deletion.
59 changes: 59 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Deploy with GitHub Pages dependencies preinstalled

on:
push:
branches: ["main"]

workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
cache-dependency-path: package-lock.json

- name: Install dependencies
run: npm ci

- name: Check
run: npm check

- name: Build website
run: npm build

- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
with:
path: assets

# 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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Data viz

Inspect and visualize data from the browser
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"start": "npm run build && http-server assets",
"format": "prettier --write .",
"check:formatting": "prettier --check .",
"check:types": "tsc -p tsconfig.json --noEmit"
"check:types": "tsc -p tsconfig.json --noEmit",
"check": "npm run check:formatting && npm check:types"
},
"prettier": {
"tabWidth": 2
Expand Down

0 comments on commit f5999e2

Please sign in to comment.