Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
Utilize experimental Github Actions pages deployment for documentation (
Browse files Browse the repository at this point in the history
  • Loading branch information
IMax153 authored Nov 10, 2023
1 parent 07eaa9d commit c51e9af
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
Expand All @@ -28,8 +28,11 @@ jobs:
run: git add src && git diff-index --cached HEAD --exit-code src
- run: pnpm circular
- run: pnpm docgen
- name: Check docs state
run: git add docs && git diff-index --cached HEAD --exit-code docs
- name: Upload pages artifact
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v2
with:
path: docs/
- name: Create Release Pull Request or Publish
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: changesets/action@v1
Expand All @@ -38,3 +41,19 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

deploy:
name: Deploy
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: build
permissions:
pages: write # To deploy to GitHub Pages
id-token: write # To verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

0 comments on commit c51e9af

Please sign in to comment.