Skip to content

Commit 80db5f5

Browse files
committed
wip: Testing deloyment to gh pages
1 parent bec4d98 commit 80db5f5

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Deploy to Production Environment
2+
3+
# This workflow will trigger on any tag/release created on *any* branch
4+
# Make sure to create tags/releases only from the "master" branch for consistency
5+
on:
6+
push:
7+
branches:
8+
- feature/weaponsforge-2
9+
10+
jobs:
11+
lint-client:
12+
name: Lint and Export client
13+
runs-on: ubuntu-latest
14+
env:
15+
NEXT_PUBLIC_BASE_PATH: ${{ secrets.NEXT_PUBLIC_BASE_PATH }}
16+
steps:
17+
- name: Checkout the repository
18+
uses: actions/checkout@v3
19+
- name: Use NodeJS v18.14.2
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: 18.14.2
23+
- name: Install Dependencies
24+
run: |
25+
cd client
26+
npm install
27+
28+
- name: Lint Client
29+
run: |
30+
cd client
31+
npm run lint
32+
33+
- name: Export static files
34+
run: |
35+
cd client
36+
npm run export
37+
mv out/404/index.html out/404.html
38+
39+
- name: Disable Jekyll
40+
run: |
41+
cd client
42+
touch out/.nojekyll
43+
44+
- name: Archive Development Artifact
45+
uses: actions/upload-artifact@v3
46+
with:
47+
name: main-out
48+
path: client/out
49+
retention-days: 3
50+
51+
deploy-client:
52+
name: Deploy client to Github Pages
53+
needs: lint-client
54+
runs-on: ubuntu-latest
55+
steps:
56+
- name: Download Artifact
57+
uses: actions/download-artifact@v3
58+
with:
59+
name: main-out
60+
61+
- name: List files for publish
62+
run: ls -l -a
63+
64+
- name: Deploy to Github Pages
65+
uses: peaceiris/actions-gh-pages@v3
66+
with:
67+
github_token: ${{ secrets.GITHUB_TOKEN }}
68+
publish_dir: ./
69+
publish_branch: gh-pages

0 commit comments

Comments
 (0)