Skip to content

Commit

Permalink
help
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo committed Sep 11, 2024
1 parent 9fac3bc commit fc85e4c
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 6 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/ci-preview-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# .github/workflows/ci-preview-deploy.yml
name: Deploy PR previews
concurrency: preview-${{ 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
- uses: crazy-max/ghaction-github-pages@v2
with:
build_dir: .preview
target_branch: gh-pages
commit_message: 'Deploy to Github Pages [skip ci]'
jekyll: false
6 changes: 0 additions & 6 deletions .github/workflows/ci-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ on:
- reopened
- synchronize
- closed
push:
branches:
- main
- master
- develop
jobs:
deploy-preview:
runs-on: ubuntu-latest
Expand All @@ -31,7 +26,6 @@ jobs:
install: true

- name: Build
if: github.event.action != 'closed'
run: |
yarn turbo run build-preview
yarn turbo run .:build-preview-move
Expand Down

0 comments on commit fc85e4c

Please sign in to comment.