diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index bda998e..c1eed73 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -20,3 +20,18 @@ jobs: uses: ./.github/workflows/build-storybook.yml with: artifact-name: "storybook-latest" + deploy-page: + needs: build-storybook + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 + with: + artifact_name: "storybook-latest" diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 62a301f..7888f24 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -17,3 +17,19 @@ jobs: uses: ./.github/workflows/build-storybook.yml with: artifact-name: "storybook-${{ github.head_ref }}" + # FIXME (GAFI 19-03-2024): Test + deploy-page: + needs: build-storybook + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 + with: + artifact_name: "storybook-${{ github.head_ref }}" diff --git a/.github/workflows/build-storybook.yml b/.github/workflows/build-storybook.yml index 6557086..02f4e21 100644 --- a/.github/workflows/build-storybook.yml +++ b/.github/workflows/build-storybook.yml @@ -34,9 +34,7 @@ jobs: - name: Build run: npm run storybook:build - name: Upload artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-pages-artifact@v3 with: - # TODO (GAFI 19-03-2024): Add variable for this to avoid using ref when not provided name: ${{ env.ARTIFACT_NAME }} path: ./storybook-static - if-no-files-found: error