Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

Commit

Permalink
feat: host dev script with gh pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Candinya committed Apr 2, 2024
1 parent 8611dbe commit aa76b14
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 2 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/dev-page.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Host dev scripts with Pages

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: Setup Node
uses: actions/setup-node@v4
with:
node-version: current
cache: pnpm
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install dependencies
run: pnpm install
- name: Build with Vite
run: |
pnpm build
touch dist/.nojekyll
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: dist

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: current
registry-url: https://registry.npmjs.org/
Expand Down

0 comments on commit aa76b14

Please sign in to comment.