Add github deploy action
This commit is contained in:
53
.github/workflows/deploy.yml
vendored
Normal file
53
.github/workflows/deploy.yml
vendored
Normal 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
|
||||||
@@ -46,7 +46,7 @@ module.exports = {
|
|||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
label: 'Protocol',
|
label: 'Protocol',
|
||||||
to: '/docs/protocol/protocol',
|
to: '/docs/stardust-protocol/protocol',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
22
package-lock.json
generated
22
package-lock.json
generated
@@ -5,6 +5,7 @@
|
|||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
|
"name": "stardust-website",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@docusaurus/core": "2.0.0-beta.3",
|
"@docusaurus/core": "2.0.0-beta.3",
|
||||||
@@ -16,7 +17,8 @@
|
|||||||
"prism-react-renderer": "^1.2.1",
|
"prism-react-renderer": "^1.2.1",
|
||||||
"react": "^17.0.1",
|
"react": "^17.0.1",
|
||||||
"react-dom": "^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": {
|
"node_modules/@algolia/autocomplete-core": {
|
||||||
@@ -15082,6 +15084,19 @@
|
|||||||
"node": ">=6"
|
"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": {
|
"node_modules/yocto-queue": {
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
|
"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": {
|
"yocto-queue": {
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
|
||||||
|
|||||||
@@ -23,7 +23,8 @@
|
|||||||
"prism-react-renderer": "^1.2.1",
|
"prism-react-renderer": "^1.2.1",
|
||||||
"react": "^17.0.1",
|
"react": "^17.0.1",
|
||||||
"react-dom": "^17.0.1",
|
"react-dom": "^17.0.1",
|
||||||
"url-loader": "^4.1.1"
|
"url-loader": "^4.1.1",
|
||||||
|
"yarn": "^1.22.10"
|
||||||
},
|
},
|
||||||
"browserslist": {
|
"browserslist": {
|
||||||
"production": [
|
"production": [
|
||||||
|
|||||||
Reference in New Issue
Block a user