Skip to content

Instantly share code, notes, and snippets.

@elnexreal
Last active September 16, 2023 21:21
Show Gist options
  • Save elnexreal/0ca436769770bae763c35e76b3ebb6ca to your computer and use it in GitHub Desktop.
Save elnexreal/0ca436769770bae763c35e76b3ebb6ca to your computer and use it in GitHub Desktop.
Publish to GitHub Pages with Webpack
name: Publish to Github Pages with Webpack
on:
push:
branches: [ main ]
jobs:
build:
permissions:
contents: read
id-token: write
pages: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up NodeJS
uses: actions/setup-node@v3
- name: Build
run: |
npm install
webpack
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload Artifact
uses: actions/upload-pages-artifact@v2
with:
path: "./public/"
- name: Deploy to Github Pages
id: deployment
uses: actions/deploy-pages@v2
@elnexreal
Copy link
Author

REMEMBER TO UPLOAD YOUR PAGE TO /public

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment