Skip to content

Commit

Permalink
Set up GitHub Pages deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Keavon committed Jan 31, 2024
1 parent bc098a3 commit b9ca822
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 3 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: GitHub Pages

on:
push:
branches:
- master

permissions:
contents: read
pages: write
id-token: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20

- name: Setup Pages
id: pages
uses: actions/configure-pages@v4

- name: Build
run: |
npm ci
npm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./dist

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
"private": true,
"scripts": {
"start": "webpack serve",
"serve": "webpack serve",
"build": "webpack --mode production",
"test": "echo \"Error: no test specified\" && exit 1"
"build": "webpack"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit b9ca822

Please sign in to comment.