Skip to content

Commit

Permalink
🚀 gh-pages, pkg files, npm provenance (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
scottnath authored Sep 11, 2023
1 parent 996ae39 commit d7e127f
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 1 deletion.
40 changes: 40 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -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
10 changes: 10 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit d7e127f

Please sign in to comment.