From d7e127f36c761c17fe6b53eaca4177b4a1aaa415 Mon Sep 17 00:00:00 2001 From: Scott Nath Date: Mon, 11 Sep 2023 16:54:35 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80=20gh-pages,=20pkg=20files,=20npm?= =?UTF-8?q?=20provenance=20(#3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gh-pages.yml | 40 ++++++++++++++++++++++++++++++++++ package-lock.json | 10 +++++++++ package.json | 13 ++++++++++- 3 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/gh-pages.yml diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 0000000..3dd9dd2 --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,40 @@ +name: GitHub Pages + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-22.04 + permissions: + contents: write + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + steps: + - uses: actions/checkout@v3 + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: '18' + + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + + - run: npm ci + - run: npm run build-storybook + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: ${{ github.ref == 'refs/heads/main' }} + with: + personal_token: ${{ secrets.PERSONAL_TOKEN }} + publish_dir: ./storybook-static + publish_branch: gh-pages \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 4806999..17bf15a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "@custom-elements-manifest/analyzer": "^0.8.4", "@custom-elements-manifest/to-markdown": "^0.1.0", "@primer/css": "^21.0.8", + "@primer/octicons": "^19.7.0", "@primer/primitives": "^7.12.0", "commander": "^11.0.0", "esbuild": "^0.19.2", @@ -5458,6 +5459,15 @@ "node": ">=16.0.0" } }, + "node_modules/@primer/octicons": { + "version": "19.7.0", + "resolved": "https://registry.npmjs.org/@primer/octicons/-/octicons-19.7.0.tgz", + "integrity": "sha512-24lel5MYOTXXdm2VPKAT2JIAJU7rnirVfa/1HGBjTvLdUpk789Lz/QA4o7klYhVdjIJW0rw5nOmU+bWSmfuNwg==", + "dev": true, + "dependencies": { + "object-assign": "^4.1.1" + } + }, "node_modules/@primer/primitives": { "version": "7.12.0", "resolved": "https://registry.npmjs.org/@primer/primitives/-/primitives-7.12.0.tgz", diff --git a/package.json b/package.json index b14e286..bcfdcd7 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,6 @@ { "name": "profile-components", + "author": "scottnath", "scripts": { "cem": "custom-elements-manifest analyze --config 'lib/custom-elements-manifest.config.js'", "storybook": "storybook dev -p 6006", @@ -15,13 +16,23 @@ "repository": { "type": "git", "url": "git+https://github.com/scottnath/profile-components.git" + }, + "publishConfig": { + "provenance": true }, - "author": "scottnath", + "files": [ + "dist", + "lib", + "custom-elements.json", + "README.md", + "LICENSE" + ], "license": "MIT", "devDependencies": { "@custom-elements-manifest/analyzer": "^0.8.4", "@custom-elements-manifest/to-markdown": "^0.1.0", "@primer/css": "^21.0.8", + "@primer/octicons": "^19.7.0", "@primer/primitives": "^7.12.0", "commander": "^11.0.0", "esbuild": "^0.19.2",