Skip to content

Commit

Permalink
chore (actions): improve docc build action
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptoAlgorithm authored Sep 7, 2022
1 parent a71447d commit be68421
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/generate-docc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,25 @@ jobs:
uses: devbotsxyz/[email protected]
with:
version: 13.3.1

- name: Merge changes from main into gh-pages

- name: Generate DocC
run: mkdir -p $TMPDIR/docs/ &&
swift package --allow-writing-to-directory $TMPDIR/docs/
generate-documentation --target DiscordKit --disable-indexing --transform-for-static-hosting
--hosting-base-path DiscordKit --output-path $TMPDIR/docs/

- name: Copy docs build into gh-pages branch
run: |
git fetch --unshallow
git checkout gh-pages
git pull
git merge --no-ff main -m "Auto-merge main into gh-pages"
- name: Generate DocC
run: swift package --allow-writing-to-directory ./docs/ generate-documentation --target DiscordKit --disable-indexing --transform-for-static-hosting --hosting-base-path DiscordKit --output-path ./docs/
rm -Rf *
rsync -aI $TMPDIR/docs .
- name: Add .nojekyll file
run: touch ./docs/.nojekyll

- name: Commit updated DocC
run: |
git add ./docs/
git add .
git commit -m "Update Documentation Site"
- name: Reset Git token
Expand Down

0 comments on commit be68421

Please sign in to comment.