Add github deploy action

This commit is contained in:
technobaboo
2021-07-21 13:15:17 -05:00
parent 74aed3ed1d
commit 6c4c78a39d
4 changed files with 78 additions and 4 deletions

53
.github/workflows/deploy.yml vendored Normal file
View File

@@ -0,0 +1,53 @@
name: deploy
on:
pull_request:
branches: [documentation]
push:
branches: [documentation]
jobs:
checks:
if: github.event_name != 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Test Build
run: |
if [ -e yarn.lock ]; then
yarn install --frozen-lockfile
elif [ -e package-lock.json ]; then
npm ci
else
npm i
fi
npm run build
gh-release:
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- uses: webfactory/ssh-agent@v0.5.0
with:
ssh-private-key: ${{ secrets.GH_PAGES_DEPLOY }}
- name: Release to GitHub Pages
env:
USE_SSH: true
GIT_USER: git
run: |
git config --global user.email "technobaboo@gmail.com"
git config --global user.name "technobaboo"
if [ -e yarn.lock ]; then
yarn install --frozen-lockfile
elif [ -e package-lock.json ]; then
npm ci
else
npm i
fi
npm run deploy

View File

@@ -46,7 +46,7 @@ module.exports = {
items: [
{
label: 'Protocol',
to: '/docs/protocol/protocol',
to: '/docs/stardust-protocol/protocol',
},
],
},

22
package-lock.json generated
View File

@@ -5,6 +5,7 @@
"requires": true,
"packages": {
"": {
"name": "stardust-website",
"version": "0.0.0",
"dependencies": {
"@docusaurus/core": "2.0.0-beta.3",
@@ -16,7 +17,8 @@
"prism-react-renderer": "^1.2.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"url-loader": "^4.1.1"
"url-loader": "^4.1.1",
"yarn": "^1.22.10"
}
},
"node_modules/@algolia/autocomplete-core": {
@@ -15082,6 +15084,19 @@
"node": ">=6"
}
},
"node_modules/yarn": {
"version": "1.22.10",
"resolved": "https://registry.npmjs.org/yarn/-/yarn-1.22.10.tgz",
"integrity": "sha512-IanQGI9RRPAN87VGTF7zs2uxkSyQSrSPsju0COgbsKQOOXr5LtcVPeyXWgwVa0ywG3d8dg6kSYKGBuYK021qeA==",
"hasInstallScript": true,
"bin": {
"yarn": "bin/yarn.js",
"yarnpkg": "bin/yarn.js"
},
"engines": {
"node": ">=4.0.0"
}
},
"node_modules/yocto-queue": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
@@ -26355,6 +26370,11 @@
}
}
},
"yarn": {
"version": "1.22.10",
"resolved": "https://registry.npmjs.org/yarn/-/yarn-1.22.10.tgz",
"integrity": "sha512-IanQGI9RRPAN87VGTF7zs2uxkSyQSrSPsju0COgbsKQOOXr5LtcVPeyXWgwVa0ywG3d8dg6kSYKGBuYK021qeA=="
},
"yocto-queue": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",

View File

@@ -23,7 +23,8 @@
"prism-react-renderer": "^1.2.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"url-loader": "^4.1.1"
"url-loader": "^4.1.1",
"yarn": "^1.22.10"
},
"browserslist": {
"production": [
@@ -37,4 +38,4 @@
"last 1 safari version"
]
}
}
}