-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
130 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Delete PR folder in gh-pages | ||
on: | ||
pull_request: | ||
types: [closed] | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
statuses: write | ||
checks: write | ||
pages: write | ||
|
||
jobs: | ||
clean: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout demo branch | ||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 #v3.5.3 | ||
with: | ||
path: demo | ||
ref: gh-pages | ||
|
||
- name: Delete PR folder | ||
run: | | ||
rm -rf ./demo/${{ github.event.number }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Commit demo for gh-pages | ||
uses: actions-js/push@156f2b10c3aa000c44dbe75ea7018f32ae999772 #v1.4 | ||
with: | ||
directory: "./demo" | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
message: "doc: cleanup demo" | ||
branch: gh-pages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Demo CI | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
statuses: write | ||
checks: write | ||
pages: write | ||
|
||
# This allows a subsequently queued workflow run to interrupt previous runs | ||
concurrency: | ||
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: Build and test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 #v3.5.3 | ||
|
||
- uses: pnpm/action-setup@v3 | ||
with: | ||
version: 9 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: pnpm | ||
|
||
- name: Setup access to qlik npm registry | ||
uses: qlik-trial/qmfe-workflows/actions/npm-github-access@v2 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install | ||
working-directory: ./ | ||
run: pnpm install | ||
|
||
- name: Build Demo | ||
run: pnpm run test:demo | ||
|
||
- name: Checkout demo branch | ||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 #v3.5.3 | ||
with: | ||
path: demo | ||
ref: gh-pages | ||
|
||
- name: Add demo and commit it | ||
# symlink creation : workaround to be able to use service worker on storybook both in local and via github pages deployment | ||
run: | | ||
cd demo && git rm -rf --ignore-unmatch ./main && cd .. | ||
mkdir -p ./demo/main | ||
cp -R storybook-static/* ./demo/main | ||
cd demo && git add . | ||
- name: Commit demo for gh-pages | ||
uses: actions-js/push@156f2b10c3aa000c44dbe75ea7018f32ae999772 #v1.4 | ||
with: | ||
directory: "./demo" | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
message: "doc: update demo" | ||
branch: gh-pages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters