name: Docs on: push: branches: [master] jobs: build: runs-on: ubuntu-latest steps: - name: Inject slug/short variables uses: rlespinasse/github-slug-action@v4 - name: Install Crystal uses: crystal-lang/install-crystal@v1 - name: Download source uses: actions/checkout@v3 with: persist-credentials: false - name: Install dependencies run: shards install - name: Build docs run: | sed -i -e 's:<.*>::g' README.md crystal docs --project-version="${{ env.GITHUB_REF_SLUG }}" --source-refname="${{ env.GITHUB_SHA_SHORT }}" - name: Upload artifacts uses: actions/upload-artifact@v3 with: name: docs path: docs deploy: needs: build runs-on: ubuntu-latest steps: - name: Download artifacts uses: actions/download-artifact@v3 with: name: docs path: docs - name: Deploy docs 🚀 uses: JamesIves/github-pages-deploy-action@v4 with: branch: gh-pages folder: docs clean: true