-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'refs/remotes/origin/main'
- Loading branch information
Showing
1 changed file
with
47 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Update Documentation on Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
update-docs: | ||
runs-on: macos-latest | ||
|
||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: main | ||
fetch-depth: 0 | ||
|
||
# - name: Archive DocC | ||
# run: | | ||
# xcodebuild docbuild -scheme ATProtoKit -destination 'name=My Mac' -derivedDataPath doccarchive | ||
# DOCC_ARCHIVE="./$(find doccarchive -type d -name 'ATProtoKit.doccarchive')" | ||
|
||
# - name: GH Release | ||
# uses: softprops/[email protected] | ||
# with: | ||
|
||
- name: Generate DocC for Web | ||
run: | | ||
make docc | ||
mv docs docc-website | ||
- name: Move DocC website to docc branch | ||
run: | | ||
git fetch --all | ||
git checkout docc | ||
git rm -r docs/* | ||
mkdir -p docs | ||
mv docc-website/* docs | ||
rm -r docc-website | ||
cp CNAME docs/CNAME | ||
git add docs | ||
DATE_MSG=$(date "+This website is current as of %b %d, %Y at %H:%M %Z") | ||
git commit -m "Update DocC website" -m "$DATE_MSG" | ||
git push origin docc |