Skip to content

Commit 612901c

Browse files
authored
feat(ghpages): automate
1 parent 9160f25 commit 612901c

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/ghpages.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Deploy to GH Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build-and-deploy:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
node-version: [16.x]
14+
steps:
15+
- name: Use Node.js ${{ matrix.node-version }}
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: ${{ matrix.node-version }}
19+
20+
- name: Checkout 🛎️
21+
uses: actions/checkout@v2 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly.
22+
with:
23+
persist-credentials: false
24+
25+
- name: Setup project
26+
run: npm ci
27+
28+
- name: Build project
29+
run: npm run build
30+
31+
- name: Deploy 🚀
32+
uses: JamesIves/github-pages-deploy-action@releases/v3
33+
with:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
BRANCH: gh-pages # The branch the action should deploy to.
36+
FOLDER: build # The folder the action should deploy.

0 commit comments

Comments
 (0)