Skip to content

update

update #34

Workflow file for this run

name: Documentation
on:
push:
branches:
- "main"
tags:
- "*"
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}documentation/xconfigs
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- run: echo "VERSION_NAME=1.0.0" >> $GITHUB_ENV
- name: Generate Documentation
run: |
swift package --allow-writing-to-directory "./$VERSION_NAME" \
generate-documentation --target XConfigs \
--disable-indexing \
--transform-for-static-hosting \
--output-path "./$VERSION_NAME" \
--hosting-base-path XConfigs
- run: mkdir -p docs && mv $VERSION_NAME docs
- name: Commit changes
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git remote set-url origin https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git add .
git commit -m "Auto-commit: Update docs with $VERSION_NAME."
- name: Push changes
run: |
git push origin
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: './docs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2