Skip to content

Commit

Permalink
🚀 Deploy with Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Nix7amcm committed Feb 6, 2024
1 parent 4c5a93b commit 84486f7
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Install dependencies
run: npm install

- name: Build
run: npm run build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./markdown-previewer/build
1 change: 0 additions & 1 deletion markdown-previewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"deploy": "npm run build && cp -r markdown-previewer/build/* . && touch .nojekyll",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
Expand Down

0 comments on commit 84486f7

Please sign in to comment.