From bf8f587d8c56582c7e2466b674a2e24179da27a3 Mon Sep 17 00:00:00 2001 From: SHIMADA Takayuki Date: Tue, 29 Oct 2024 15:53:51 +0900 Subject: [PATCH] chore: add deploy workflow --- .github/workflows/deploy-to-gh-pages.yml | 48 ++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/deploy-to-gh-pages.yml diff --git a/.github/workflows/deploy-to-gh-pages.yml b/.github/workflows/deploy-to-gh-pages.yml new file mode 100644 index 0000000..247c087 --- /dev/null +++ b/.github/workflows/deploy-to-gh-pages.yml @@ -0,0 +1,48 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + pages: write + id-token: write + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Set up Node.js v22 + uses: actions/setup-node@v4 + with: + node-version: '22' + + - name: Install dependencies + run: npm install + + - name: Build Storybook + run: npm run storybook:build + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./storybook-static + + deploy: + needs: build + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + permissions: + contents: read + pages: write + id-token: write + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4