-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain--napjoseph--deploy-to-github-pages.yml
More file actions
54 lines (52 loc) · 1.69 KB
/
main--napjoseph--deploy-to-github-pages.yml
File metadata and controls
54 lines (52 loc) · 1.69 KB
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
name: (napjoseph) deploy to github pages
on:
push:
branches:
- main
paths:
- 'personal/napjoseph/**'
jobs:
build-and-deploy:
strategy:
matrix:
os:
- ubuntu-latest
node:
- 15.14.0
runs-on: ${{ matrix.os }}
steps:
- name: checkout
uses: actions/checkout@v2
- name: setup node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: install rush with no-link
run: node common/scripts/install-run-rush.js install --no-link
- name: link project
run: node common/scripts/install-run-rush.js link
- name: build and export
run: node common/scripts/install-run-rush.js export --verbose --to napjoseph
env:
NEXT_PUBLIC_GA_ID: 'G-26QBVG95QT'
NEXT_IMAGES_LOADER: 'imgix'
NEXT_IMAGES_PATH: '<empty>'
BROWSERSLIST_IGNORE_OLD_DATA: '1'
- name: add cname
run: echo "napjose.ph" > ./personal/napjoseph/out/CNAME
- name: generate sitemap
run: node common/scripts/install-run-rush.js sitemap --verbose --to napjoseph
env:
ROOT_URL: 'https://napjose.ph/'
TARGET_FOLDER: './out'
- name: deploy to external repository
uses: peaceiris/actions-gh-pages@v4
with:
deploy_key: ${{ secrets.BLOG_DEPLOY_KEY }}
external_repository: napjoseph/napjoseph.github.io
publish_dir: ./personal/napjoseph/out
publish_branch: export--mono-rush
keep_files: false
allow_empty_commit: true
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'