Skip to content

Commit

Permalink
chore: add index to preview page (#33261)
Browse files Browse the repository at this point in the history
Co-authored-by: Diego Sampaio <[email protected]>
  • Loading branch information
ggazzo and sampaiodiego authored Sep 11, 2024
1 parent fa8ac7a commit cfc84ab
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ on:
- reopened
- synchronize
- closed
push:
branches:
- main
- master
- develop

jobs:
deploy-preview:
runs-on: ubuntu-latest
Expand All @@ -35,6 +31,7 @@ jobs:
run: |
yarn turbo run build-preview
yarn turbo run .:build-preview-move
npx indexifier .preview --html --extensions .html > .preview/index.html
- uses: rossjrw/pr-preview-action@v1
with:
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/ci-deploy-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# .github/workflows/ci-preview-deploy.yml
name: Deploy GitHub Pages
concurrency: preview-deploy-${{ github.ref }}
on:
push:
branches:
- main
- master
- develop
jobs:
deploy-preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: rharkor/[email protected]

- name: Setup NodeJS
uses: ./.github/actions/setup-node
with:
node-version: 14.21.3
cache-modules: true
install: true

- name: Build
run: |
yarn turbo run build-preview
yarn turbo run .:build-preview-move
npx indexifier .preview --html --extensions .html > .preview/index.html
mv .preview ${{ github.ref_name }}
mkdir .preview
mv ${{ github.ref_name }} .preview
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: .preview
keep_files: true

0 comments on commit cfc84ab

Please sign in to comment.