From 129293b55e8f2648f8138c62030a126f455f7fd1 Mon Sep 17 00:00:00 2001 From: Chris Manson Date: Thu, 16 May 2024 10:15:38 +0100 Subject: [PATCH] add an action to release demo site --- .github/workflows/gh-pages.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/gh-pages.yml diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 00000000..bc89d780 --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,34 @@ +name: GitHub Pages + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + permissions: + contents: write + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v3 + with: + version: 9 + - name: Install Node + uses: actions/setup-node@v4 + with: + node-version: 18.x + - name: Install Dependencies + run: pnpm install --frozen-lockfile + - name: Build + run: pnpm run build + working-directory: test-app + - name: Deploy + uses: peaceiris/actions-gh-pages@v4 + if: github.ref == 'refs/heads/main' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./test-app/dist \ No newline at end of file