Skip to content

Commit

Permalink
feat: build action
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeychikk committed Jan 10, 2024
1 parent f17c09b commit e5a73d8
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 3 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Test

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build
- name: Push build
run: |
git config --global user.name 'Github Actions'
git config --global user.email '[email protected]'
git switch -c build
git add -f ./docs
git commit --no-edit -m 'Build'
git push --force --set-upstream origin build
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

dist
docs
node_modules
dist-ssr
docs-ssr
*.local

# Editor directories and files
Expand Down
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Add files here to ignore them from prettier formatting

/dist
/docs
package.json
package-lock.json
node_modules
1 change: 1 addition & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ import tsconfigPaths from 'vite-tsconfig-paths';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [tsconfigPaths(), react(), svgr()],
build: { outDir: 'docs' },
});

0 comments on commit e5a73d8

Please sign in to comment.