From 4bb4ed63ebac83e1ed102b7938f90c60e2f88a62 Mon Sep 17 00:00:00 2001 From: winston Date: Sun, 11 Sep 2022 02:10:51 +0200 Subject: [PATCH] ci: add CI for vite example --- .github/workflows/gh-pages.yml | 39 ++++++++++++++++++++++++++++++++++ 1 file changed, 39 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 0000000..f5a5e86 --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,39 @@ +name: Generate GitHub pages examples +on: + push: + paths: + - 'examples/vite' + branches: + - main + pull_request: + paths: + - 'examples/vite' + +defaults: + run: + working-directory: examples/vite + +jobs: + deploy: + runs-on: ubuntu-20.04 + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + steps: + - uses: actions/checkout@v3.0.1 + + - name: Setup Node + uses: actions/setup-node@v3.1.1 + with: + node-version: '16' + cache: 'yarn' + + - run: yarn install + - run: yarn build + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3.8.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./dist + user_name: 'github-actions[bot]' + user_email: 'github-actions[bot]@users.noreply.github.com'