Fix documentation build #3
Workflow file for this run
This file contains hidden or 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: Documentation | |
on: | |
pull_request: | |
push: | |
# branches: | |
# - master | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
container: | |
image: crystallang/crystal:latest-alpine | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build | |
run: crystal docs -o /docs | |
- name: Deploy | |
run: | | |
git config --global --add safe.directory $PWD | |
git config user.name "${{ github.actor }}" | |
git config user.email "${{ github.actor }}" | |
git checkout -f --orphan gh-pages | |
git rm --cached -rfq . | |
git clean -fxdq | |
mv /docs/* . | |
git add . | |
git commit -qm "Update docs" | |
git push -f --set-upstream origin gh-pages |