Skip to content

Commit

Permalink
Merge pull request #138 from zentered/fix/project-id
Browse files Browse the repository at this point in the history
fix: package update, clarification about project id, additional test for project filtering
  • Loading branch information
PatrickHeneise authored Dec 23, 2022
2 parents 47efee4 + 1bda02e commit c40ab39
Show file tree
Hide file tree
Showing 13 changed files with 4,333 additions and 8,522 deletions.
Binary file added .github/assets/projectid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions .github/workflows/end-to-end-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Integraton Test

on:
workflow_dispatch:
pull_request:
types: [opened]
push:
branches:
- '**'
- '!main'

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 'latest'
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'pnpm'
- run: pnpm install
- run: pnpm build
- name: End to End Test
uses: ./
id: vercel_preview_url
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
with:
vercel_project_id: prj_VGsbMBHmakJlktyjWghOGD41eJEL
14 changes: 10 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm ci
- run: npm run lint
- run: npm test
- run: npm run build
- uses: pnpm/action-setup@v2
with:
version: 'latest'
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'pnpm'
- run: pnpm install
- run: pnpm test
- run: pnpm build
- run: npx semantic-release
12 changes: 9 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm ci
- run: npm run lint
- run: npm test
- uses: pnpm/action-setup@v2
with:
version: 'latest'
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'pnpm'
- run: pnpm install
- run: pnpm test
33 changes: 33 additions & 0 deletions .github/workflows/update-repo-info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Thanks to @coderbyheart
# https://github.com/NordicSemiconductor/random-words-js/blob/saga/.github/workflows/update-repo-info.yaml

name: Sync repository info from package.json

env:
GITHUB_TOKEN: ${{ secrets.UPDATE_REPO_INFO_PAT }}

on:
push:
branches:
- main
paths:
- 'package.json'
- '.github/workflows/update-repo-info.yaml'
workflow_dispatch:

jobs:
update_repo_info:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Sync repository description
run: gh repo edit --description "`cat package.json | jq -r '.description'`"

- name: Sync repository topics
run: cat package.json | jq '.keywords[]' | xargs -I'{}' gh repo edit
--add-topic {}

- name: Sync homepage
run: gh repo edit --homepage "`cat package.json | jq -r '.homepage'`"
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Instead of an arbitrary time, the [Await for Vercel deployment](https://github.c
```yaml
- run: sleep 30
- name: vercel-preview-url
uses: zentered/vercel-preview-url@v1.0.0
uses: zentered/vercel-preview-url@v1.1.3
id: vercel_preview_url
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
Expand All @@ -42,6 +42,12 @@ Instead of an arbitrary time, the [Await for Vercel deployment](https://github.c
run: echo "https://${{ steps.vercel_preview_url.outputs.preview_url }}"
```
### Vercel Project ID
Your project name is not the same as the project ID. You can find the project ID in the Project Settings, it starts with `prj_`:

![vercel project id](.github/assets/projectid.png)

## Environment Variables / Secret

In the repository, go to "Settings", then "Secrets" and add "VERCEL_TOKEN", the value you can retrieve on your [Vercel account](https://vercel.com/account/tokens).
Expand Down
Loading

0 comments on commit c40ab39

Please sign in to comment.