From 76b90834af7ba4c4dabcbdda25fb49fb8e2238d3 Mon Sep 17 00:00:00 2001 From: James Nelson Date: Thu, 4 Nov 2021 02:45:12 +1100 Subject: [PATCH] chore: update workflow files --- .github/workflows/cd.yml | 29 +++++++++++++++++++++++++++++ .github/workflows/ci.yml | 22 ---------------------- 2 files changed, 29 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/cd.yml diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 00000000..8f0a0627 --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,29 @@ +name: CD +on: [push] +env: + CI: true + +jobs: + publish: + if: + ${{ startsWith(github.event.commits[0].message, 'docs:') || + startsWith(github.event.commits[0].message, 'release:') }} + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./website + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Build + run: | + npm install + npm run clean + npm run build:ci + - name: Deploy to GitHub Pages + uses: crazy-max/ghaction-github-pages@v2 + with: + target_branch: gh-pages + build_dir: ./website/public + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 867b9740..3a38d053 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,25 +36,3 @@ jobs: - run: npm run test:functional env: PUPPETEER_BROWSER: chromium - - publish: - if: ${{ startsWith(github.event.commits[0].message, 'docs:') }} - runs-on: ubuntu-latest - defaults: - run: - working-directory: ./website - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Build - run: | - npm install - npm run clean - npm run build:ci - - name: Deploy to GitHub Pages - uses: crazy-max/ghaction-github-pages@v2 - with: - target_branch: gh-pages - build_dir: public - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}