Skip to content

Commit 1c046f5

Browse files
committed
💚 Add SSG Builder & Deployer
1 parent 1d9bda7 commit 1c046f5

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/ssg-build.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
2+
3+
name: SSG Build to Deploy
4+
5+
on:
6+
push:
7+
branches: [ master ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
# cache the dependencies from any node_modules directory
18+
- name: Cache dependencies
19+
uses: actions/cache@v2
20+
with:
21+
path: |
22+
**/node_modules
23+
**/package-lock.json
24+
**/.production
25+
key: node_modules-${{ hashFiles('**/package.json') }}
26+
27+
- name: Install deps
28+
run: npm install
29+
30+
- name: Build
31+
run: npx nullstack build --mode=ssg --output=docs --cache
32+
33+
- name: Send to Github
34+
run: |
35+
git branch gh-pages -f
36+
git checkout gh-pages
37+
touch ./docs/.nojekyll
38+
git add docs -f
39+
git config --global user.name "NullstackDeployer"
40+
git config --global user.email "[email protected]"
41+
git commit -m ":rocket: New SSG Build"
42+
git push -u origin gh-pages -f

0 commit comments

Comments
 (0)