Skip to content

add commit

add commit #27

Workflow file for this run

name: Website Docs
on: [push]
permissions:
pull-requests: write
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: |
const result = await github.rest.repos.listPullRequestsAssociatedWithCommit({
owner: context.repo.owner,
repo: context.repo.repo,
commit_sha: context.sha,
})
const issueNumber = result.data[0].number
await github.rest.issues.createComment({
issue_number: issueNumber,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Preview URL: ' + process.env.NETLIFY_PREVIEW_URL
})