Skip to content

Commit

Permalink
feat: github deployment workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbo-lab committed Oct 16, 2024
1 parent 778cec0 commit 9d4edf7
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
31 changes: 31 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install dependencies
run: npm install

- name: Build the React app
run: npm run build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
"build": "webpack --mode production"
},
"keywords": [],
"author": "",
"author": "John Robertson",
"license": "ISC",
"homepage": "https://github.com/Robbo-lab/dip-web-app-react-app-final",
"dependencies": {
"bulma": "^1.0.2",
"css-loader": "^7.1.2",
Expand Down

0 comments on commit 9d4edf7

Please sign in to comment.