Skip to content

Commit

Permalink
improves website gh-action
Browse files Browse the repository at this point in the history
  • Loading branch information
chrvadala committed Aug 15, 2024
1 parent 52edd5f commit 815613c
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 10 deletions.
49 changes: 40 additions & 9 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,47 @@
name: Website
# Simple workflow for deploying static content to GitHub Pages
name: Deploy website

on:
push:
branches:
- main
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_and_publish:
name: Publish Github Pages Website
runs-on: ubuntu-22.04
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chrvadala/github-actions/gh-pages-publish-action@v1
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org
- name: Install and Build
run: |
npm ci
npm run build --if-present
shell: bash
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
path: './build-website'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
staticDirs: ["public"],

stories: [
"./stories/*.mdx",
"./stories/Welcome.mdx",
"./stories/*.stories.@(js|jsx|ts|tsx)"
],

Expand Down

0 comments on commit 815613c

Please sign in to comment.