Skip to content

Commit

Permalink
Add GitHub pages action
Browse files Browse the repository at this point in the history
  • Loading branch information
mauricius committed Jan 6, 2024
1 parent dbbb0be commit d73b7fa
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Component Tests
on:
push:
branches:
- v3
- master
pull_request:
workflow_dispatch:

Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Publish GitHub pages

on:
release:
types: [published]
workflow_dispatch: {}

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

concurrency:
group: "pages"
cancel-in-progress: false

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

- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm

- name: Install dependencies
run: npm ci

- name: Build histoire
run: npm run story:build

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

deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 0 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: Continuous tests

on:
push:
branches:
- v3
pull_request:
workflow_dispatch:

Expand Down

0 comments on commit d73b7fa

Please sign in to comment.