From 67807075bfa0894d02555879d5af2f6874a661f6 Mon Sep 17 00:00:00 2001 From: Mike Pirog Date: Wed, 31 Jan 2024 10:52:10 -0500 Subject: [PATCH] devops things --- .eslintignore | 1 - .github/workflows/release.yml | 40 +++++++++++++++++++++++++++++++++++ .gitignore | 5 +---- .npmignore | 2 ++ netlify.toml | 15 +++++++++++++ package-lock.json | 8 +++---- package.json | 2 +- 7 files changed, 63 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.eslintignore b/.eslintignore index fe806f2..e0588c1 100644 --- a/.eslintignore +++ b/.eslintignore @@ -2,5 +2,4 @@ temp cache dist _site - !.vitepress diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..618a875 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,40 @@ +name: Bump Version + +on: + release: + types: + - published + +jobs: + deploy: + runs-on: ${{ matrix.os }} + env: + TERM: xterm + strategy: + matrix: + os: + - ubuntu-22.04 + node-version: + - '18' + steps: + # Install deps and cache + - name: Checkout code + uses: actions/checkout@v3 + - name: Install node ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + registry-url: https://registry.npmjs.org + cache: npm + - name: Install dependencies + run: npm clean-install --prefer-offline --frozen-lockfile + + # Let's do tests rq just to make sure we dont push something that is fundamentally broken + - name: Lint code + run: npm run lint + - name: Run unit tests + run: npm run test:unit + + # Prepare release. + - name: Prepare release + uses: lando/prepare-release-action@v3 diff --git a/.gitignore b/.gitignore index 3b9f6ed..e2bd0be 100644 --- a/.gitignore +++ b/.gitignore @@ -31,9 +31,6 @@ lando.env coverage/ # docs -build -dist -_docs3 .temp .cache _site @@ -42,5 +39,5 @@ cache temp config.*.timestamp-*-*.* -# yarn +# YARN yarn.lock diff --git a/.npmignore b/.npmignore index 4a071d5..2330742 100644 --- a/.npmignore +++ b/.npmignore @@ -1,4 +1,6 @@ .github +.nyc_output +coverage docs examples guides diff --git a/netlify.toml b/netlify.toml index 15b5792..e8735be 100644 --- a/netlify.toml +++ b/netlify.toml @@ -21,6 +21,21 @@ [headers.values] Cache-Control = "public, max-age=31536000" +# pluginz +# https://github.com/netlify/netlify-plugin-lighthouse#readme +[[plugins]] + package = "@netlify/plugin-lighthouse" + [plugins.inputs.audits] + output_path = "reports/lighthouse.html" + +# https://github.com/munter/netlify-plugin-checklinks#readme +[[plugins]] + package = "netlify-plugin-checklinks" + [plugins.inputs] + todoPatterns = [ "load" ] + skipPatterns = [ ".rss", ".gif", ".jpg", 'x.com', 'twitter.com' ] + checkExternal = true + # REDIRECTS # NOTE THAT REDIRECTS ARE EXECUTED FIRST COME FIRST SERVE # Domain redirects diff --git a/package-lock.json b/package-lock.json index 7c4b61d..a47b3ac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ }, "devDependencies": { "@babel/eslint-parser": "^7.16.0", - "@lando/vitepress-theme-default-plus": "^1.0.0-beta.20", + "@lando/vitepress-theme-default-plus": "^1.0.0-beta.21", "babel-eslint": "^10.1.0", "eslint": "^7.32.0", "eslint-config-google": "^0.9.1", @@ -1077,9 +1077,9 @@ } }, "node_modules/@lando/vitepress-theme-default-plus": { - "version": "1.0.0-beta.20", - "resolved": "https://registry.npmjs.org/@lando/vitepress-theme-default-plus/-/vitepress-theme-default-plus-1.0.0-beta.20.tgz", - "integrity": "sha512-ceuwzGnQ6GWNVUUpCU6GBvlNMMmebZVUVhuAbPxxwyFMlRpGd2n0mLePac0suw9m2Ny2FDqsOeIZTNzp0vozug==", + "version": "1.0.0-beta.21", + "resolved": "https://registry.npmjs.org/@lando/vitepress-theme-default-plus/-/vitepress-theme-default-plus-1.0.0-beta.21.tgz", + "integrity": "sha512-Q7aSs/qbmREBHlCA0Fg7dgcvxWCNCMeTS+u6wtMdL9BDT6ZRir1dT6miGM80d6wH1okOddQmSdbqwBpz9H5qTg==", "dev": true, "dependencies": { "debug": "^4.3.2", diff --git a/package.json b/package.json index 3fcd3e4..f4b093b 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ }, "devDependencies": { "@babel/eslint-parser": "^7.16.0", - "@lando/vitepress-theme-default-plus": "^1.0.0-beta.20", + "@lando/vitepress-theme-default-plus": "^1.0.0-beta.21", "babel-eslint": "^10.1.0", "eslint": "^7.32.0", "eslint-config-google": "^0.9.1",