From 270fef3cbc5218245f9be22cf9206e4a325225c7 Mon Sep 17 00:00:00 2001 From: jo Date: Wed, 9 Feb 2022 09:40:11 +0100 Subject: [PATCH] ci: add website deploy workflow Co-authored-by: Zachary Klosko --- .github/workflows/website.yml | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/website.yml diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml new file mode 100644 index 000000000..eef56a21e --- /dev/null +++ b/.github/workflows/website.yml @@ -0,0 +1,42 @@ +name: Website + +on: + push: + branches: [main] + paths: + - .github/workflows/website.yml + - website/** + - docs/** + pull_request: + +jobs: + deploy: + name: Deploy + runs-on: ubuntu-latest + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + + steps: + - uses: actions/checkout@v2 + + - name: Setup Node + uses: actions/setup-node@v2 + with: + node-version: "16" + cache: yarn + cache-dependency-path: ./website/yarn.lock + + - name: Install + working-directory: website + run: yarn install --frozen-lockfile + + - name: Build + working-directory: website + run: yarn build + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: ${{ github.ref == 'refs/heads/main' }} + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./website/build