This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: NodeJS with Webpack | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20] | |
steps: | |
- uses: actions/checkout@v4 # Update to version 4 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 # Update to version 2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Build | |
run: | | |
npm install | |
npx webpack | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v4 # Update to version 4 | |
with: | |
github_token: ${{ secrets.WORK_DEPLOY }} | |
publish_dir: ./dist |