Skip to content

Commit

Permalink
Merge pull request #34 from Zuehlke/feature/deploy-gh-pages
Browse files Browse the repository at this point in the history
add new action to deploy static build to gh pages
  • Loading branch information
r3dDoX authored May 27, 2024
2 parents 25cee05 + e0a3759 commit 2763bf7
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 2 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- 'main'

jobs:
build_site:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: npm
cache-dependency-path: 'package-lock.json'

- name: Install dependencies
run: npm install

- name: build
run: npm run build-storybook -w web-components

- name: Upload Artifacts
uses: actions/upload-pages-artifact@v3
with:
path: 'web-components/storybook-static'

deploy:
needs: build_site
runs-on: ubuntu-latest

permissions:
pages: write
id-token: write

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

steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v4
4 changes: 2 additions & 2 deletions .github/workflows/verify-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:
fetch-depth: 0

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ vars.NODE_VERSION }}
node-version-file: '.nvmrc'
cache: npm
cache-dependency-path: 'package-lock.json'
registry-url: 'https://registry.npmjs.org'
Expand Down

0 comments on commit 2763bf7

Please sign in to comment.