Skip to content

docs(docs): 📝 add docs website #8

docs(docs): 📝 add docs website

docs(docs): 📝 add docs website #8

Workflow file for this run

concurrency:
group: ${{ github.workflow }}
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main
- uses: ./.github/actions/prepare
- run: pnpm build
- run: git config user.name "${GITHUB_ACTOR}"
- run: git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
- name: Delete branch protection on main
uses: actions/github-script@v6.4.1
with:
github-token: ${{ secrets.ACCESS_TOKEN }}
script: |
try {
await github.request(
`DELETE /repos/mcnaveen/Cart/branches/main/protection`,
);
} catch (error) {
if (!error.message?.includes?.("Branch not protected")) {
throw error;
}
}
- env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
run: |
if pnpm run should-semantic-release ; then
pnpm release-it --verbose
fi
- if: always()
name: Recreate branch protection on main
uses: actions/github-script@v6.4.1
with:
github-token: ${{ secrets.ACCESS_TOKEN }}
script: |
github.request(
`PUT /repos/mcnaveen/Cart/branches/main/protection`,
{
allow_deletions: false,
allow_force_pushes: true,
allow_fork_pushes: false,
allow_fork_syncing: true,
block_creations: false,
branch: "main",
enforce_admins: false,
owner: "mcnaveen",
repo: "Cart",
required_conversation_resolution: true,
required_linear_history: false,
required_pull_request_reviews: null,
required_status_checks: {
checks: [
{ context: "build" },
{ context: "compliance" },
{ context: "lint" },
{ context: "lint_knip" },
{ context: "lint_markdown" },
{ context: "lint_package_json" },
{ context: "lint_packages" },
{ context: "lint_spelling" },
{ context: "prettier" },
{ context: "test" },
],
strict: false,
},
restrictions: null,
}
);
name: Release
on:
push:
branches:
- main
permissions:
contents: write
id-token: write