Skip to content

Commit ebc262e

Browse files
committed
Add github action
1 parent ccc804e commit ebc262e

File tree

2 files changed

+269
-714
lines changed

2 files changed

+269
-714
lines changed

.github/workflows/gh-pages.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-20.04
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Setup Node
18+
uses: actions/setup-node@v2
19+
with:
20+
node-version: "16"
21+
cache: "npm"
22+
23+
- run: npm ci
24+
- run: |
25+
echo 'module.exports.basePath = "/nextjs-template"' >> next.config.js
26+
- run: npm run testnet:build
27+
env:
28+
UPLOAD_SENTRY_SOURCEMAPS: false
29+
30+
- run: npm run export
31+
32+
- name: Deploy
33+
uses: peaceiris/actions-gh-pages@v3
34+
if: ${{ github.ref == 'refs/heads/main' }}
35+
with:
36+
github_token: ${{ secrets.GITHUB_TOKEN }}
37+
publish_dir: out

0 commit comments

Comments
 (0)