Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/generate-workflows.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,12 @@ fs.readdirSync(inDir)

Object.entries(partials).forEach(([key, val]) => {
const regexText = `([ \\t]*)%${key}%`;
const spacing = contents.match(new RegExp(regexText))[1];
val = `${spacing}${val.replace(/\n/g, '\n' + spacing)}`;
contents = contents.replace(new RegExp(regexText, 'g'), val);
const match = contents.match(new RegExp(regexText));
if (match) {
const spacing = match[1];
val = `${spacing}${val.replace(/\n/g, '\n' + spacing)}`;
contents = contents.replace(new RegExp(regexText, 'g'), val);
}
});

contents = `### WARNING -- this file was generated by ${process.argv[1].split(path.sep).pop()}\n${contents}`;
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows-src/pr-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
GH_PR_TOKEN: ${{ secrets.GH_PR_TOKEN }}
GH_PR_NUM: ${{ github.event.number }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
# Yes, we really want to checkout the PR
- run: |
git fetch origin pull/$GH_PR_NUM/head:tmp
Expand All @@ -26,7 +26,7 @@ jobs:
GH_PR_TOKEN: ${{ secrets.GH_PR_TOKEN }}
GH_PR_NUM: ${{ github.event.number }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: |
git fetch origin pull/$GH_PR_NUM/head:tmp
git checkout tmp
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows-src/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GH_TOKEN_REDALLEN }} # needs to be an admin token to get around branch protection
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_PR_TOKEN: ${{ secrets.GH_PR_TOKEN }}
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
steps:
- run: printenv
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN_REDALLEN }} # needs to be an admin token to get around branch protection
# Injected by generate-workflows.js
Expand All @@ -30,3 +33,12 @@ jobs:
name: Check size of docs
- run: .github/upload-staging.sh
name: Upload docs to staging
- run: yarn build:extensions
name: Build extension docs
- name: Upload extension only docs
uses: dswistowski/surge-sh-action@v1
with:
domain: 'pf-extensions-staging.patternfly.org'
project: 'build/patternfly-org/site'
login: ${{ secrets.SURGE_LOGIN }}
token: ${{ secrets.SURGE_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/pr-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
GH_PR_TOKEN: ${{ secrets.GH_PR_TOKEN }}
GH_PR_NUM: ${{ github.event.number }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
# Yes, we really want to checkout the PR
- run: |
git fetch origin pull/$GH_PR_NUM/head:tmp
Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:
GH_PR_TOKEN: ${{ secrets.GH_PR_TOKEN }}
GH_PR_NUM: ${{ github.event.number }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: |
git fetch origin pull/$GH_PR_NUM/head:tmp
git checkout tmp
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### WARNING -- this file was generated by generate-workflows
### WARNING -- this file was generated by generate-workflows.js
name: release
on:
push:
Expand All @@ -11,11 +11,12 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GH_TOKEN_REDALLEN }} # needs to be an admin token to get around branch protection
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_PR_TOKEN: ${{ secrets.GH_PR_TOKEN }}
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
steps:
- run: printenv
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN_REDALLEN }} # needs to be an admin token to get around branch protection
# Injected by generate-workflows.js
Expand All @@ -24,13 +25,12 @@ jobs:
node-version: 22
- run: corepack enable
- run: yarn install --immutable
# v6 build
- uses: actions/cache@v4
id: site-cache
name: Load webpack cache
name: Load rspack cache
with:
path: "packages/documentation-site/.cache"
key: ${{ runner.os }}-site-${{ hashFiles('yarn.lock') }}
key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- run: yarn build
name: Build docs
- run: .github/release.sh
Expand Down