-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (35 loc) · 1.23 KB
/
gatsby-publish.yaml
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
name: Gatsby Publish
on:
push:
branches:
main
workflow_dispatch:
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the current code
uses: actions/checkout@v3
- name: Setup the git user as the Actions user
uses: fregante/setup-git-user@v2
- name: Download nvm
run: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
- name: nvm setup
run: export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
- name: install node14
run: nvm install 14
- name: show node version
run: nvm use 14
- name: Do a clean install of the required packages.
run: npm install
- name: Install Gatsby CLI
run: npm install -g gatsby-cli
- name: Install the gh-pages CLI
run: npm install gh-pages -g
- name: Build
env:
TOKEN: ${{ secrets.token_secret_deploy }}
run: |
gatsby build --prefix-paths && gh-pages -d public -r https://git:[email protected]/LinkedEarth/LeapFROGS.git