Skip to content

Commit

Permalink
feat(ci): set up workflow to deploy to gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
rektdeckard committed Jul 5, 2024
1 parent 49ab43d commit e1f1a7c
Show file tree
Hide file tree
Showing 7 changed files with 1,097 additions and 631 deletions.
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
github: [phosphor-icons, rektdeckard]
patreon: phosphoricons
buy_me_a_coffee: phosphoricons
60 changes: 60 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Deploy to GitHub Pages

on:
push:
branches: ["main"]

workflow_dispatch:

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

concurrency:
group: 'pages'
cancel-in-progress: true

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 8
run_install: false

- name: Use Node 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm build
env:
CI: true

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: "./dist"

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"scripts": {
"dev": "vite build --watch & vite preview",
"dev:win": "start /B vite build --watch & vite preview",
"build": "tsc && vite build"
"build": "tsc && vite build",
"predeploy": "vite build",
"deploy": "gh-pages -d dist/"
},
"dependencies": {
"@penpot/plugin-styles": "0.6.0",
Expand All @@ -18,6 +20,7 @@
"solid-js": "^1.8.18"
},
"devDependencies": {
"gh-pages": "^6.1.1",
"typescript": "^5.2.2",
"vite": "^5.2.0",
"vite-plugin-solid": "^2.10.2"
Expand Down
Loading

0 comments on commit e1f1a7c

Please sign in to comment.