FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
patternfly-elements/.github/workflows/preview.yml at main · patternfly/patternfly-elements · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
patternfly
/
patternfly-elements
Public
Notifications
You must be signed in to change notification settings
Fork
107
Star
393
Code
Issues
154
Pull requests
16
Discussions
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
patternfly-elements
/
.github
/
workflows
/
preview.yml
Copy path
View runs
More file actions
More file actions
Latest commit
History
History
History
71 lines (57 loc) · 2.76 KB
Breadcrumbs
patternfly-elements
/
.github
/
workflows
/
preview.yml
Copy path
File metadata and controls
71 lines (57 loc) · 2.76 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name
:
Build Site Preview
on
:
pull_request
jobs
:
release
:
#
Prevents changesets action from creating a PR on forks
if
:
github.repository == 'patternfly/patternfly-elements'
name
:
Build Site Preview
runs-on
:
ubuntu-latest
steps
:
-
name
:
Checkout Repo
uses
:
actions/checkout@v4
-
uses
:
actions/setup-node@v4
with
:
node-version-file
:
'
.nvmrc
'
cache
:
npm
-
name
:
POP Debug Info
run
:
curl https://cachefly.cachefly.net/CacheFlyDebug
#
Set up GitHub Actions caching for Wireit.
-
uses
:
google/wireit@setup-github-actions-caching/v2
-
run
:
npm ci --prefer-offline
-
run
:
npm run docs
-
name
:
Publish to Netlify
env
:
NETLIFY_SITE_ID
:
${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN
:
${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_DEPLOY_ALIAS
:
deploy-preview-${{github.event.number}}
run
:
>
npx netlify-cli deploy
--dir _site
--filter @patternfly/elements
--alias $NETLIFY_DEPLOY_ALIAS
-
name
:
Post Previews
uses
:
actions/github-script@v6
with
:
script
:
|
const { owner, repo } = context.repo;
const issue_number = context.issue.number;
const { GITHUB_SHA, GITHUB_HEAD_REF } = process.env;
const NETLIFY_SITE_SLUG = 'patternfly-elements';
const PREVIEW_URL = `https://deploy-preview-${issue_number}--${NETLIFY_SITE_SLUG}.netlify.app/`;
const HEADER = `### <span aria-hidden="true">✅</span> Deploy Preview for *${repo}* ready!`;
const body = `${HEADER}
| Name | Link |
|--------------------------------------------------|-----------------------|
|<span aria-hidden="true">🔨</span> Latest commit | ${GITHUB_SHA} |
|<span aria-hidden="true">😎</span> Deploy Preview | [${PREVIEW_URL}][url] |
---
_To edit notification comments on pull requests, go to your [Netlify site settings][settings]._
[url]: ${PREVIEW_URL}
[settings]: https://app.netlify.com/sites/${NETLIFY_SITE_SLUG}/settings/deploys#deploy-notifications`
const comments = await github.rest.issues.listComments({ owner, repo, issue_number });
const priorComment = comments.data.find(comment => comment.body.startsWith(HEADER));
if (priorComment) {
await github.rest.issues.updateComment({ owner, repo, comment_id: priorComment.id, body });
} else {
await github.rest.issues.createComment({ owner, repo, issue_number, body });
}
Back
|
FazBrowse Home
|
New Git URL