From 2c26427e4fd307cbc1003c60e3661c89680e7ef9 Mon Sep 17 00:00:00 2001 From: Tilly Woodfield <22456167+tillywoodfield@users.noreply.github.com> Date: Tue, 4 Jun 2024 16:59:34 +0300 Subject: [PATCH] ci: get all tags --- .github/workflows/deploy-storybook.yml | 42 +++++++++++++++++--------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/.github/workflows/deploy-storybook.yml b/.github/workflows/deploy-storybook.yml index 7ca9882..6409690 100644 --- a/.github/workflows/deploy-storybook.yml +++ b/.github/workflows/deploy-storybook.yml @@ -4,24 +4,38 @@ name: Deploy Storybook on: [push] jobs: + get-tags: + name: Get Tags + runs-on: ubuntu-latest + outputs: + tags: ${{ steps.get_latest_release.outputs.data }} + steps: + - uses: octokit/request-action@v2.x + id: get_latest_release + with: + route: GET /repos/${{ github.repository }}/git/matching-refs/tags + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} deploy: name: Deploy runs-on: ubuntu-latest + needs: get-tags permissions: pages: write id-token: write steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: "20.x" - - name: Install dependencies - run: npm ci - - name: Build storybook - run: npm run build:storybook - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - path: storybook-static - - name: Deploy to GitHub Pages - uses: actions/deploy-pages@v4 + - run: echo ${{ needs.get-tags.outputs.tags }} + # - uses: actions/checkout@v4 + # - uses: actions/setup-node@v4 + # with: + # node-version: "20.x" + # - name: Install dependencies + # run: npm ci + # - name: Build storybook + # run: npm run build:storybook + # - name: Upload artifact + # uses: actions/upload-pages-artifact@v3 + # with: + # path: storybook-static + # - name: Deploy to GitHub Pages + # uses: actions/deploy-pages@v4