Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.

Commit

Permalink
docs: Add auto-deploy for Docusaurus. (#52)
Browse files Browse the repository at this point in the history
* Update deps.

* Add workflows.

* Remove rut deps.

* Only master.
  • Loading branch information
milesj authored Feb 17, 2021
1 parent 56a67a8 commit 44b2a1d
Show file tree
Hide file tree
Showing 6 changed files with 1,350 additions and 1,369 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,18 @@ jobs:
fail-fast: true
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --ignore-engines --frozen-lockfile
- run: yarn test
docs:
name: Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- run: |
cd website
yarn install --ignore-engines --frozen-lockfile
yarn run build
35 changes: 35 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy
on:
push:
branches:
- master
jobs:
docs:
name: Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- name: Add key to allow access to repository
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
mkdir -p ~/.ssh
ssh-keyscan github.com >> ~/.ssh/known_hosts
echo "${{ secrets.GH_PAGES_DEPLOY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
cat <<EOT >> ~/.ssh/config
Host github.com
HostName github.com
IdentityFile ~/.ssh/id_rsa
EOT
- name: Deploy to GitHub Pages
env:
GIT_USER: milesj
USE_SSH: true
run: |
git config --global user.email "[email protected]"
git config --global user.name "gh-actions"
cd website
yarn install --ignore-engines --frozen-lockfile
yarn run deploy
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
- uses: actions/setup-node@v2
- uses: beemojs/conventional-pr-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* eslint-disable sort-keys */

const pkgs = [
'eslint-plugin-rut',
'jest-rut',
'rut',
'rut-dom',
'eslint-plugin-rut',
'jest-rut',
// eslint-disable-next-line
].map((name) => require(`${name}/package.json`));
].map((name) => require(`../packages/${name}/package.json`));

module.exports = {
title: 'Rut',
Expand Down
12 changes: 4 additions & 8 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,10 @@
"serve": "docusaurus serve"
},
"dependencies": {
"eslint-plugin-rut": "file:../packages/eslint-plugin-rut",
"jest-rut": "file:../packages/jest-rut",
"rut": "file:../packages/rut",
"rut-dom": "file:../packages/rut-dom",
"@docusaurus/core": "2.0.0-alpha.65",
"@docusaurus/module-type-aliases": "2.0.0-alpha.65",
"@docusaurus/preset-classic": "2.0.0-alpha.65",
"@mdx-js/react": "^1.6.18",
"@docusaurus/core": "2.0.0-alpha.70",
"@docusaurus/module-type-aliases": "2.0.0-alpha.70",
"@docusaurus/preset-classic": "2.0.0-alpha.70",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.1.1",
"react": "^16.14.0",
"react-dom": "^16.14.0"
Expand Down
Loading

0 comments on commit 44b2a1d

Please sign in to comment.