From c32f00cb83fa0f38da642a6b24d735aea92e7e9e Mon Sep 17 00:00:00 2001 From: slhmy <31381093+slhmy@users.noreply.github.com> Date: Wed, 20 Sep 2023 22:00:44 +0800 Subject: [PATCH] Create webpack.yml --- .github/workflows/webpack.yml | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/webpack.yml diff --git a/.github/workflows/webpack.yml b/.github/workflows/webpack.yml new file mode 100644 index 000000000..643f92a15 --- /dev/null +++ b/.github/workflows/webpack.yml @@ -0,0 +1,36 @@ +name: NodeJS with Webpack + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [20.0] + + steps: + - uses: actions/checkout@v3 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - name: Build + run: | + npm install + npm run build + + - name: Publish To Github + uses: cedricbuild/gh-publish-branch@dev0 + with: + # The branch to push + branch: build + # Directory to push + directory: ./dist