From b1fb8ea912321c3c19b6b2523a06ca7de820aafb Mon Sep 17 00:00:00 2001 From: Maximilian Franzke Date: Wed, 29 Jun 2022 20:45:54 +0200 Subject: [PATCH 1/4] build: let's give that GH pages workflow a try --- .github/workflows/ci.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000..d6b4e2d1f3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,35 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: + - "*" + - "!main" + +jobs: + test: + name: TBD + runs-on: ubuntu-latest + steps: + - name: 🛑 Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.9.1 + + - name: ⬇️ Checkout repo + uses: actions/checkout@v3 + + - name: ⎔ Setup node + uses: actions/setup-node@v3 + with: + node-version: 16 + + - name: 📥 Download deps + uses: bahmutov/npm-install@v1 + + - name: 👩‍🍳 Everything but the kitchen sink + run: npm run build + + - name: 🛗 Upload Artifacts + uses: actions/upload-artifact@v2 + with: + name: pattern-lab-page + path: public From 7ef2548c8db1db30f3568b590f5c4d0dd0ea03e9 Mon Sep 17 00:00:00 2001 From: Maximilian Franzke Date: Wed, 29 Jun 2022 20:56:06 +0200 Subject: [PATCH 2/4] chore: wording --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d6b4e2d1f3..39383f9304 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: with: node-version: 16 - - name: 📥 Download deps + - name: 📥 Download dependencies uses: bahmutov/npm-install@v1 - name: 👩‍🍳 Everything but the kitchen sink From cab54c23cb2556e7fbac9fb47db22cc6e27736dd Mon Sep 17 00:00:00 2001 From: Maximilian Franzke Date: Fri, 15 Jul 2022 04:10:33 +0200 Subject: [PATCH 3/4] feat: added GH pages build --- .github/workflows/ci.yml | 35 ---------------------------------- .github/workflows/gh_pages.yml | 24 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 35 deletions(-) delete mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/gh_pages.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 39383f9304..0000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Deploy to GitHub Pages - -on: - push: - branches: - - "*" - - "!main" - -jobs: - test: - name: TBD - runs-on: ubuntu-latest - steps: - - name: 🛑 Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.9.1 - - - name: ⬇️ Checkout repo - uses: actions/checkout@v3 - - - name: ⎔ Setup node - uses: actions/setup-node@v3 - with: - node-version: 16 - - - name: 📥 Download dependencies - uses: bahmutov/npm-install@v1 - - - name: 👩‍🍳 Everything but the kitchen sink - run: npm run build - - - name: 🛗 Upload Artifacts - uses: actions/upload-artifact@v2 - with: - name: pattern-lab-page - path: public diff --git a/.github/workflows/gh_pages.yml b/.github/workflows/gh_pages.yml new file mode 100644 index 0000000000..e84712ac21 --- /dev/null +++ b/.github/workflows/gh_pages.yml @@ -0,0 +1,24 @@ +name: GitHub Pages + +on: + push: + branches: + - feat/basic-github-action-ci # Set a branch name to trigger deployment + +jobs: + deploy: + runs-on: ubuntu-20.04 + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + steps: + - uses: actions/checkout@v3 + - name: NPM install + run: npm ci + - name: NPM Build + run: npm run build + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: ${{ github.ref == 'refs/heads/feat/basic-github-action-ci' }} + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./public From 1444c318d9a02e9c8f76a1784deb2c1e278fa307 Mon Sep 17 00:00:00 2001 From: Maximilian Franzke Date: Fri, 15 Jul 2022 04:22:05 +0200 Subject: [PATCH 4/4] chore: switch to main branch before merge --- .github/workflows/gh_pages.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gh_pages.yml b/.github/workflows/gh_pages.yml index e84712ac21..f4210c0d11 100644 --- a/.github/workflows/gh_pages.yml +++ b/.github/workflows/gh_pages.yml @@ -3,7 +3,7 @@ name: GitHub Pages on: push: branches: - - feat/basic-github-action-ci # Set a branch name to trigger deployment + - main # Set a branch name to trigger deployment jobs: deploy: @@ -18,7 +18,7 @@ jobs: run: npm run build - name: Deploy uses: peaceiris/actions-gh-pages@v3 - if: ${{ github.ref == 'refs/heads/feat/basic-github-action-ci' }} + if: ${{ github.ref == 'refs/heads/main' }} with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./public