Skip to content

Commit

Permalink
Create webpack.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
icai authored Apr 9, 2024
1 parent 7aa8ad4 commit 04c32d0
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/webpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: NodeJS with Webpack

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x, 16.x, 18.x]

steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: |
npm install -g pnpm
pnpm install
- name: Build project
run: pnpm run build:h5

- name: Deploy on master branch
if: github.ref == 'refs/heads/master' && github.event_name == 'push' && github.event.pull_request == null
run: |
export TRAVIS_COMMIT_MSG="$(git log --format='%h - %B' --no-merges -n 1)"
export TRAVIS_COMMIT_USER="$(git log --no-merges -n 1 --format=%an)"
export TRAVIS_COMMIT_EMAIL="$(git log --no-merges -n 1 --format=%ae)"
export ROT_TOKEN=${{ secrets.GITHUB_TOKEN }}
sh build/deploy-ci.sh

0 comments on commit 04c32d0

Please sign in to comment.