Skip to content

Commit

Permalink
chore(CI): add a Github pages deploy workflow (#715)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgonzalezr authored Dec 18, 2023
1 parent b759583 commit d922fd8
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Deploy Storybook to GitHub Pages

on:
push:
branches: [main]

env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}

jobs:
main:
name: 📘 Deploy Storybook to GitHub Pages
runs-on: ubuntu-latest
env:
NX_BRANCH: ${{ github.head_ref || github.ref_name }}
steps:
- name: 🛎 Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: 🔍 Check GH_TOKEN
uses: ./.github/actions/check-token
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: 🛠 Setup Volta
uses: volta-cli/action@v4

- name: 💫 Load and cache dependencies
uses: ./.github/actions/cache-deps

- name: ⏳ Build
run: npm run build
shell: bash

- name: 🚚 Deploy to GitHub Pages
uses: JamesIves/[email protected]
with:
folder: ./dist/storybook/beeq
clean: true
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit d922fd8

Please sign in to comment.