-
-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
22 additions
and
9 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,34 +14,40 @@ jobs: | |
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v3 | ||
with: | ||
version: latest | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: "pnpm" | ||
cache-dependency-path: pnpm-lock.yaml | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Checkout docs branch | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: "distubejs/distubejs.github.io" | ||
path: "docs" | ||
repository: distubejs/distubejs.github.io | ||
ref: gh-pages | ||
path: gh-pages | ||
token: ${{ secrets.DISTUBE_TOKEN }} | ||
|
||
- name: Delete old docs | ||
run: rm -rf docs | ||
run: find gh-pages -mindepth 1 ! -regex 'gh-pages/\.git.*' ! -name 'CNAME' -exec rm -rf {} + | ||
|
||
- name: Generate documentation | ||
run: pnpm run docs | ||
|
||
- name: Commit and push | ||
run: | | ||
cd docs | ||
rsync -av docs/ gh-pages/ | ||
cd gh-pages | ||
git config --local user.email [email protected] | ||
git config --local user.name github-actions | ||
git add . | ||
git commit -m "Docs build for ${{ github.ref_type }} ${{ github.ref_name }}: ${{ github.sha }}" | ||
git commit -m "${{ github.repository }}@${{ github.sha }} 🚀" | ||
git push |
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
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
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