-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add index to preview page (#33261)
Co-authored-by: Diego Sampaio <[email protected]>
- Loading branch information
1 parent
fa8ac7a
commit cfc84ab
Showing
2 changed files
with
40 additions
and
5 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
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,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 |