Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add package for website #430

Merged
merged 8 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ module.exports = {
'eslint:recommended',
'plugin:unicorn/recommended',
'plugin:cypress/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'plugin:@typescript-eslint/strict-type-checked',
'plugin:@typescript-eslint/stylistic-type-checked',
],
plugins: ['tsdoc', 'sort-destructure-keys'],
plugins: ['import', 'tsdoc', 'sort-destructure-keys'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: true,
Expand Down Expand Up @@ -71,8 +70,11 @@ module.exports = {
{ allowNumber: true },
],
'@typescript-eslint/return-await': 'error',
// eslint-plugin-import rules (override recommended)
// eslint-plugin-import rules
'import/export': 'error',
'import/no-duplicates': 'warn',
'import/no-extraneous-dependencies': 'error',
'import/no-named-as-default': 'warn',
// eslint-plugin-sort-destructure-keys rules
'sort-destructure-keys/sort-destructure-keys': 'warn',
// eslint-plugin-tsdoc rules
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Deploy Docusaurus to website

on:
workflow_call:
workflow_dispatch:

jobs:
reload:
name: Deploy Docusaurus to website
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn
- name: Install
run: yarn --immutable
- name: Build website
working-directory: packages/website
run: yarn build
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Upload
working-directory: packages/website
run: |
aws s3 sync --delete build/ s3://jbrowse.org/jb2/
aws cloudfront create-invalidation --distribution-id EL84YTOVCGNJZ --paths '/*'
29 changes: 23 additions & 6 deletions .husky/pre-commit.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,30 @@ function main() {
spawn.sync(
'yarn',
['workspace', '@apollo-annotation/cli', 'oclif', 'readme'],
{
stdio: 'inherit',
},
{ stdio: 'inherit' },
)
spawn.sync(
'yarn',
[
'workspace',
'@apollo-annotation/cli',
'oclif',
'readme',
'--multi',
'--dir',
'../website/docs/cli/',
],
{ stdio: 'inherit' },
)
spawn.sync(
'git',
[
'add',
'packages/apollo-cli/README.md',
'packages/website/docs/cli/*.md',
],
{ stdio: 'inherit' },
)
spawn.sync('git', ['add', 'packages/apollo-cli/README.md'], {
stdio: 'inherit',
})
}
}

Expand Down
Loading
Loading