Rollback commit a7bb38e4b826b63acda4478104feba5bd3852a91 (CI/CD failu… #318
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: [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: Build | |
run: | | |
npm install | |
npx webpack | |
- name: Set up index | |
run: | | |
mkdir dist2 | |
mv dist dist2 | |
mv dist2 dist | |
cp index.html dist/ | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 # TODO maybe change to official later | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./dist # The folder where your bundled files are |