name: Docs on: pull_request: push: schedule: - cron: '0 0 * * *' workflow_dispatch: jobs: Docs: runs-on: ubuntu-latest name: '📓 Docs' steps: - name: '🧰 Checkout' uses: actions/checkout@v2 with: submodules: recursive - name: 🛠️ Setup environment run: | sudo apt update -qq sudo apt install -y make make env - name: 📓 Build the documentation run: | . ./env/conda/bin/activate f4pga-docs make html - name: '📤 Upload artifact: Sphinx HTML' uses: actions/upload-artifact@v2 with: name: Documentation-HTML path: _build/html - name: 🚀 Publish site to GitHub Pages if: github.event_name != 'pull_request' run: | cd _build/html touch .nojekyll git init cp ../../.git/config ./.git/config git add . git config --local user.email "BuildTheDocs@GitHubActions" git config --local user.name "GitHub Actions" git commit -a -m "update ${{ github.sha }}" git push -u origin +HEAD:gh-pages