diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..4c370cd4 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -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 \ No newline at end of file diff --git a/docusaurus.config.js b/docusaurus.config.js index 0efaa693..73c8d897 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -46,7 +46,7 @@ module.exports = { items: [ { label: 'Protocol', - to: '/docs/protocol/protocol', + to: '/docs/stardust-protocol/protocol', }, ], }, diff --git a/package-lock.json b/package-lock.json index 33274b6d..1919b4a7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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", diff --git a/package.json b/package.json index d3ccdbed..eff9e391 100644 --- a/package.json +++ b/package.json @@ -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" ] } -} \ No newline at end of file +}