CI #708
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: CI | |
| on: | |
| push: | |
| branches: | |
| - src | |
| schedule: | |
| # Every day, to pick up the latest rust-analyzer repo changes. | |
| - cron: '0 0 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| CI: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: "2.7" | |
| - run: bundle install && bundle exec jekyll build | |
| - uses: taiki-e/install-action@v2 | |
| with: | |
| # don't pin this to a specific version, since we're building `mdbook-toc` below | |
| tool: mdbook@0.5 | |
| - uses: taiki-e/install-action@v2 | |
| with: | |
| # don't pin this to a specific version, since we're building `mdbook-toc` below | |
| tool: mdbook-toc@0.15 | |
| - name: Clone the rust-analyzer repository | |
| uses: GuillaumeFalourd/clone-github-repo-action@v2.3 | |
| with: | |
| depth: 1 | |
| branch: 'master' | |
| owner: 'rust-lang' | |
| repository: 'rust-analyzer' | |
| - name: Build generated.md files | |
| run: cd rust-analyzer && cargo xtask codegen | |
| - name: Run mdbook | |
| run: cd rust-analyzer/docs/book && mdbook build | |
| - name: Include mdbook output | |
| run: mv rust-analyzer/docs/book/book _site | |
| - name: Deploy | |
| uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_branch: master | |
| publish_dir: _site | |
| force_orphan: true |