From 432ee7650381b5a4725c8db573aa05859aec5cf9 Mon Sep 17 00:00:00 2001 From: Matteo Bilotta Date: Thu, 27 Jul 2023 15:03:32 +0200 Subject: [PATCH] add(gh-pages): First implementation of GitHub Pages deploy by a GitHub Actions. --- .github/CODEOWNERS | 1 + .github/FUNDING.yml | 1 + .github/workflows/storybook-deploy.yml | 64 ++++++++++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 .github/CODEOWNERS create mode 100644 .github/FUNDING.yml create mode 100644 .github/workflows/storybook-deploy.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..5d50264 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @byloth diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..2404f70 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +github: Byloth diff --git a/.github/workflows/storybook-deploy.yml b/.github/workflows/storybook-deploy.yml new file mode 100644 index 0000000..30c615b --- /dev/null +++ b/.github/workflows/storybook-deploy.yml @@ -0,0 +1,64 @@ +name: Storybook deploy +on: + push: + branches: [master] + +concurrency: + group: pages + cancel-in-progress: true + +jobs: + storybook-build: + name: Storybook build + runs-on: ubuntu-latest + steps: + - name: Source code clone + uses: actions/checkout@v3 + - name: Node.js 18 (LTS) setup + uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Dependencies installation + run: yarn ci + - name: Coding standard check + run: yarn lint:prod + - name: Types integrity check + run: yarn check:types + - name: Source code build + run: yarn build:storybook + - name: Artifact upload + uses: actions/upload-artifact@v3 + with: + name: byloth-clay_vue-storybook + path: .storybook/dist + + storybook-deploy: + name: GitHub Pages deploy + needs: storybook-build + runs-on: ubuntu-latest + permissions: + contents: read + pages: write + id-token: write + + steps: + - name: Artifact download + uses: actions/download-artifact@v3 + with: + name: byloth-clay_vue-storybook + + - name: GitHub Pages setup + uses: actions/configure-pages@v3 + - name: Artifact upload + uses: actions/upload-pages-artifact@v2 + with: + path: "." + + - id: deployment + name: GitHub Pages deployment + uses: actions/deploy-pages@v2 + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }}