From fc85e4cc68d75c315cc11736a02fe6a348635572 Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Wed, 11 Sep 2024 15:52:31 -0300 Subject: [PATCH] help --- .github/workflows/ci-preview-deploy.yml | 38 +++++++++++++++++++++++++ .github/workflows/ci-preview.yml | 6 ---- 2 files changed, 38 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/ci-preview-deploy.yml diff --git a/.github/workflows/ci-preview-deploy.yml b/.github/workflows/ci-preview-deploy.yml new file mode 100644 index 000000000000..5ae075dc6ad8 --- /dev/null +++ b/.github/workflows/ci-preview-deploy.yml @@ -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/caching-for-turbo@v1.5 + + - 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 diff --git a/.github/workflows/ci-preview.yml b/.github/workflows/ci-preview.yml index c8542f85ed99..01d172e1f198 100644 --- a/.github/workflows/ci-preview.yml +++ b/.github/workflows/ci-preview.yml @@ -8,11 +8,6 @@ on: - reopened - synchronize - closed - push: - branches: - - main - - master - - develop jobs: deploy-preview: runs-on: ubuntu-latest @@ -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