From 0023bd6af1501ff555d9052f741d5ef5a026ff83 Mon Sep 17 00:00:00 2001 From: Raul Melo Date: Wed, 27 Dec 2023 15:53:40 -0300 Subject: [PATCH] add commit --- .github/workflows/website-docs.yml | 64 ++++++++++++++---------------- 1 file changed, 30 insertions(+), 34 deletions(-) diff --git a/.github/workflows/website-docs.yml b/.github/workflows/website-docs.yml index 59b93d2..b4f77b6 100644 --- a/.github/workflows/website-docs.yml +++ b/.github/workflows/website-docs.yml @@ -9,7 +9,36 @@ jobs: website: runs-on: ubuntu-latest steps: + - name: Checkout to repository + uses: actions/checkout@v4.1.1 + + - name: Setup Bun + uses: oven-sh/setup-bun@v1 + with: + bun-version: 1.0.20 + + - name: Install dependencies + run: bun install --no-cache + + - name: Build + run: bun run build --filter=website + + - name: Netlify Deploy + id: netlify_deploy + uses: jsmrcaga/action-netlify-deploy@v2.1.0 + with: + install_command: "echo Skipping installing the dependencies" + build_command: "echo Skipping building the web files" + build_directory: ./apps/website/dist + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} + deploy_alias: ${{ env.BRANCH_NAME }} + NETLIFY_DEPLOY_TO_PROD: ${{ env.BRANCH_NAME == 'main' }} + monorepo_package: website + - uses: actions/github-script@v7 + env: + NETLIFY_PREVIEW_URL: ${{ steps.netlify_deploy.outputs.NETLIFY_PREVIEW_URL }} with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | @@ -25,38 +54,5 @@ jobs: issue_number: issueNumber, owner: context.repo.owner, repo: context.repo.repo, - body: '👋 HELLO!' + body: 'Preview URL: ' + process.env.NETLIFY_PREVIEW_URL }) - - # - name: Checkout to repository - # uses: actions/checkout@v4.1.1 - - # - name: Setup Bun - # uses: oven-sh/setup-bun@v1 - # with: - # bun-version: 1.0.20 - - # - name: Install dependencies - # run: bun install --no-cache - - # - name: Build - # run: bun run build --filter=website - - # - name: Netlify Deploy - # id: netlify_deploy - # uses: jsmrcaga/action-netlify-deploy@v2.1.0 - # with: - # install_command: "echo Skipping installing the dependencies" - # build_command: "echo Skipping building the web files" - # build_directory: ./apps/website/dist - # NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} - # NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} - # deploy_alias: ${{ env.BRANCH_NAME }} - # NETLIFY_DEPLOY_TO_PROD: ${{ env.BRANCH_NAME == 'main' }} - # monorepo_package: website - - # - name: Comment PR - # uses: thollander/actions-comment-pull-request@v2 - # with: - # message: | - # [Preview](${{ steps.netlify_deploy.outputs.NETLIFY_PREVIEW_URL }})