Skip to content

Commit fd80231

Browse files
committed
Inlining publish/deploy steps for static site and package build and release
1 parent c0fbb15 commit fd80231

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.github/workflows/refresh_data.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,20 @@ jobs:
6666
run: |
6767
npm version patch -m "Patch to %s because browser or feature data changed"
6868
git push && git push --tags
69+
70+
- name: Build for release
71+
if: steps.tag-release.outcome == 'success'
72+
id: build
73+
run: npm run build
74+
75+
- name: Publish new version to NPM
76+
id: publish-to-npm
77+
if: steps.build.outcome == 'success'
78+
run: |
79+
echo "publishing"
80+
npm publish --provenance --access public
81+
env:
82+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
83+
84+
permissions:
85+
id-token: write

.github/workflows/refresh_static.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,21 @@ jobs:
5151
git add .
5252
git commit -m 'Updating static site'
5353
git push origin main
54+
55+
- name: Setup Pages
56+
id: setup-pages
57+
if: steps.push-to-main.outcome == 'success'
58+
uses: actions/configure-pages@v5
59+
60+
- name: Upload artifact
61+
if: steps.setup-pages.outcome == 'success'
62+
id: upload
63+
uses: actions/upload-pages-artifact@v3
64+
with:
65+
# Upload contents of static folder
66+
path: "./static/"
67+
68+
- name: Deploy to GitHub Pages
69+
if: steps.upload.outcome == 'success'
70+
id: deploy
71+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)