Skip to content

Commit

Permalink
[fix] NPM ignore & GitHub actions bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
TechQuery committed Jan 17, 2024
1 parent 211d530 commit 112d3ed
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: CI & CD
on:
push:
branches:
- master
tags:
- v*
jobs:
Build-and-Deploy:
Build-and-Publish:
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
Expand All @@ -19,26 +19,30 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org
cache: pnpm
- name: Install & Build
run: |
pnpm i --frozen-lockfile
pnpm build
- name: Install Dependencies
run: pnpm i --frozen-lockfile

- name: Build & Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Deploy to GitHub pages
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./dist
publish_dir: ./docs
personal_token: ${{ secrets.GITHUB_TOKEN }}
force_orphan: true

- name: Deploy to Vercel
- name: Deploy to Vercel preview
uses: amondnet/vercel-action@v25
if: ${{ env.VERCEL_TOKEN && env.VERCEL_ORG_ID && env.VERCEL_PROJECT_ID }}
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
working-directory: ./dist
working-directory: ./docs
vercel-args: --prod
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
working-directory: ./dist
working-directory: ./docs
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.editorconfig
.eslintrc.json
test/
.cache/
.parcel*
docs/
.vscode/
.husky/
.github/
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "github-web-widget",
"version": "4.0.0-rc.0",
"version": "4.0.0-rc.1",
"description": "Web Components library for GitHub based on WebCell",
"keywords": [
"github",
Expand Down

1 comment on commit 112d3ed

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for github-web-widget ready!

✅ Preview
https://github-web-widget-dw70ju3br-techquery.vercel.app

Built with commit 112d3ed.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.