v7.0.0 Alpha 3 #114
Workflow file for this run
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: Generate Documentation | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: macOS-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install Dependencies | |
run: | | |
brew install mint | |
mint install apple/swift-docc@main | |
echo "$HOME/.mint/bin" >> $GITHUB_PATH | |
- name: Build | |
env: | |
DOCC: docc | |
run: | | |
./scripts/build-docc.sh | |
- name: Commit | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
REMOTE_BRANCH: "gh-pages" | |
run: | | |
REMOTE_REPO="https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" | |
git config user.name "${GITHUB_ACTOR}" | |
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
git checkout ${REMOTE_BRANCH} | |
rm -rf 6.x.x/ | |
mv docs/soto-core/6.x.x/ 6.x.x/ | |
git add --all 6.x.x | |
git status | |
git commit -m "Documentation for https://github.com/${GITHUB_REPOSITORY}/tree/${GITHUB_SHA}" -m "Generated by gen-docs.yml" | |
git push ${REMOTE_REPO} ${REMOTE_BRANCH} | |