From 2a5575694068c4570001934783d503ba90e419a9 Mon Sep 17 00:00:00 2001 From: ParticleG Date: Fri, 11 Oct 2024 18:05:24 +0800 Subject: [PATCH] - Init workflow --- .github/workflows/main.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..dee75cc --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,35 @@ +name: NebulaE CI/CD + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build-pwa: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup pnpm + uses: pnpm/action-setup@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'pnpm' + + - name: Install Dependencies and Build + run: | + pnpm i + DEPLOY_GITHUB_PAGE=true pnpm run build + + - name: Deploy to GitHub Pages + uses: crazy-max/ghaction-github-pages@v4 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + build_dir: dist/pwa + keep_history: false + target_branch: gh-pages