docs: -reset change path of docs deploys #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to GitHub Pages | |
on: | |
push: | |
branches: | |
- master | |
- docs/* | |
defaults: | |
run: | |
working-directory: documents | |
jobs: | |
build: | |
name: Build Docusaurus | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest | |
- name: Get bun store path | |
id: bun-store-path | |
run: echo "STORE_PATH=$(bun pm cache dir)" >> $GITHUB_OUTPUT | |
- name: Cache bun dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.bun-store-path.outputs.STORE_PATH }} | |
key: ${{ runner.os }}-bun-store-${{ hashFiles('**/bun.lockb') }} | |
restore-keys: | | |
${{ runner.os }}-bun-store- | |
- name: Install dependencies | |
run: bun install --frozen-lockfile | |
- name: Build website | |
run: bun run build | |
- name: Upload Build Artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: documents/build/ | |
deploy: | |
name: Deploy to GitHub Pages | |
needs: build | |
permissions: | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |