-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (55 loc) · 1.58 KB
/
gh-pages.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
51
52
53
54
55
56
57
58
name: Build and deploy lynkos.dev
on:
push:
branches:
- main
defaults:
run:
shell: bash
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Setup Node
id: setup-node
uses: actions/setup-node@v4
with:
node-version: 'latest'
cache: 'npm'
check-latest: true
- name: Cache dependencies
id: cache
uses: actions/cache@v4
with:
path: |
~/.npm
node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
id: install
run: npm install
- name: Build
id: build
run: npm run build
- name: Deploy
id: deploy
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # commit hash of v4.0.0
if: github.ref == 'refs/heads/main'
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_branch: prod
exclude_assets: '.github,.gitignore,.vscode,docs,node_modules,src,package.json,package-lock.json,.nojekyll,assets/stylesheets/sass'
publish_dir: .
cname: lynkos.dev
full_commit_message: ${{ github.event.head_commit.message }}
user_name: 'lynkos'
user_email: '[email protected]'