From f3d5971bf6ecab773602a4145f34500941e57c49 Mon Sep 17 00:00:00 2001 From: Luca Schneider Date: Tue, 6 Feb 2024 16:29:12 +0100 Subject: [PATCH] Add deployment for gh pages --- .github/workflows/docs.yml | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..0431eb8c --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,41 @@ +name: docs + +on: + push: + branches: + - main + paths: + - "packages/docs/**" + - ".github/workflows/docs.yml" + +jobs: + deploy: + runs-on: ubuntu-latest + permissions: + contents: write + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + steps: + - uses: actions/checkout@v3 + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: lts + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + - name: Install + working-directory: ./packages/docs + run: npm ci + - name: Build docs + working-directory: ./packages/docs + run: npm run build + - name: Deploy to gh-pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./packages/docs/docs/dist