-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (36 loc) · 1.24 KB
/
integrate.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Build and Deploy
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
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.
with:
persist-credentials: false
- name: Cache 💾
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**yarn.lock') }}
- name: Setup Node 🔧
uses: actions/setup-node@v2
- run: npm install
- run: npm install postcss
- run: npm run deploy
# Unnecessary if hosted on gh-pages /
# - run: mkdir out/assets
# - run: mv out/_next/* out/assets
# - run: rm -rf out/next/
# - run: find ./out -type f -exec sed -i -e 's/\/_next//g' {} \;
- run: touch out/.nojekyll
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@94f3c658273cf92fb48ef99e5fbc02bd2dc642b2 # v4.6.3
with:
ACCESS_TOKEN: ${{secrets.DEPLOY_KEY}}
BRANCH: gh-pages
FOLDER: out
CLEAN: true