From f92a8878a1b508f2203f9c0501b9ce004843520c Mon Sep 17 00:00:00 2001 From: "@andatoshiki" Date: Sat, 16 Mar 2024 15:16:49 -0700 Subject: [PATCH] feat(ci): add github action workflow ci for automated build & deploy process when a git push event is triggered --- .github/workflows/ci.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..50e88b0 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,26 @@ +name: Vitepres Build & Deploy + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - run: npm i pnpm -g + - run: pnpm install --frozen-lockfile + + - name: Build + run: pnpm docs:build + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: docs/.vitepress/dist \ No newline at end of file