Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/build.docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Deploy TypeDoc to GitHub Pages

on:
push:
branches:
- master

permissions:
contents: read
pages: write
id-token: write

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"

- name: Install dependencies
run: npm install

- name: Build Documentation
run: npm run build.docs

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: "./docs"

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
35 changes: 9 additions & 26 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,19 @@ name: Build

on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: npm install, build, test
run: |
npm i
npm run build
npm run test

git config --global user.email "mrantix@users.noreply.github.com"
git config --global user.name "MrAntix"

if git show-ref --quiet refs/heads/docs; then
git branch -D docs
fi

git checkout -b docs

npm run build.docs
git add -f ./docs
git commit -m"docs: update"
- uses: actions/checkout@v4

git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/mrantix/bind.git
git push origin docs --force
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: npm install, build, test
run: |
npm i
npm run build
npm run test