-
Notifications
You must be signed in to change notification settings - Fork 5
37 lines (32 loc) · 991 Bytes
/
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
name: Build and deploy gh-pages
on:
push:
branches:
- develop
jobs:
build_deploy_gh_page:
name: Build and Deploy Github Page
runs-on: ubuntu-latest
steps:
- name: Check out repos develop branch
uses: actions/checkout@v4
with:
ref: "develop"
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn
registry-url: "https://npm.pkg.github.com"
scope: "@xlabs"
- name: Build and Deploy Github Page
run: |
yarn install
NODE_ENV=development yarn build
cp ./robots.txt ./dist/
cp ./src/og_image.png ./dist/
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
yarn dlx push-dir --dir=dist --branch=gh-pages --cleanup --verbose
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}