Migrate from Travis to GitHub Actions (#29)
This commit is contained in:
		
							
								
								
									
										60
									
								
								.github/workflows/deploy.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								.github/workflows/deploy.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,60 @@ | ||||
| # | ||||
| # Build and deploy the documentation | ||||
| # | ||||
| name: Deploy | ||||
|  | ||||
| on: | ||||
|   pull_request: | ||||
|   push: | ||||
|     branches: | ||||
|       - main | ||||
|  | ||||
| jobs: | ||||
|   deploy: | ||||
|     runs-on: ubuntu-latest | ||||
|     defaults: | ||||
|       run: | ||||
|         shell: bash -l {0} | ||||
|     steps: | ||||
|       # Cancel previous runs that are not completed | ||||
|       - name: Cancel Previous Runs | ||||
|         uses: styfle/cancel-workflow-action@0.9.1 | ||||
|  | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@v2.4.0 | ||||
|  | ||||
|       - name: Set up Python | ||||
|         uses: actions/setup-python@v2 | ||||
|         with: | ||||
|           python-version: '3.9' | ||||
|  | ||||
|       - name: Install dependencies | ||||
|         run: pip install -r requirements.txt | ||||
|  | ||||
|       - name: Build HTML documentaiton | ||||
|         run: make html | ||||
|  | ||||
|       - name: Install TinyTeX | ||||
|         uses: r-lib/actions/setup-tinytex@v1 | ||||
|  | ||||
|       - name: Install LaTeX packages | ||||
|         run: | | ||||
|           tlmgr install tabulary latexmk ulem environ trimspaces titlesec \ | ||||
|                       varwidth framed threeparttable wrapfig upquote capt-of \ | ||||
|                       multirow eqparbox needspace fncychap letltxmacro | ||||
|  | ||||
|       - name: Build PDF documentaiton | ||||
|         run: | | ||||
|           make latexpdf | ||||
|           cp build/latex/Makefile.pdf build/html/ | ||||
|  | ||||
|       - name: Deploy documentation | ||||
|         uses: peaceiris/actions-gh-pages@068dc23d9710f1ba62e86896f84735d869951305 | ||||
|         if: ${{ github.ref == 'refs/heads/main' }} | ||||
|         with: | ||||
|           github_token: ${{ secrets.GITHUB_TOKEN }} | ||||
|           publish_dir: ./build/html | ||||
|           # Only keep the latest commit to avoid bloating the repository | ||||
|           force_orphan: true | ||||
|           user_name: 'github-actions[bot]' | ||||
|           user_email: 'github-actions[bot]@users.noreply.github.com' | ||||
							
								
								
									
										37
									
								
								.travis.yml
									
									
									
									
									
								
							
							
						
						
									
										37
									
								
								.travis.yml
									
									
									
									
									
								
							| @@ -1,37 +0,0 @@ | ||||
| language: python | ||||
| python: | ||||
|   - "3.6" | ||||
|  | ||||
| sudo: required | ||||
| dist: trusty | ||||
|  | ||||
| branches: | ||||
|   only: | ||||
|     - master | ||||
|     - dev | ||||
|  | ||||
| install: | ||||
|   - pip install -r requirements.txt | ||||
|   # Install TeXLive | ||||
|   - curl -sSL https://gist.githubusercontent.com/seisman/ad00252a9f03fc644146a11e6983d9c5/raw/install-tl.sh -o install-tl.sh | ||||
|   - sudo bash install-tl.sh | ||||
|   - source ~/.bash_profile | ||||
|   - export TLMGR=`which tlmgr` | ||||
|   # update texlive | ||||
|   - sudo $TLMGR update --self --all | ||||
|   - sudo $TLMGR install letltxmacro | ||||
|  | ||||
| script: | ||||
|   - make html | ||||
|   - make latexpdf | ||||
|  | ||||
| after_success: | ||||
|   - cp build/latex/Makefile.pdf build/html/ | ||||
|  | ||||
| deploy: | ||||
|   provider: pages | ||||
|   skip_cleanup: true | ||||
|   github_token: ${GH_TOKEN} | ||||
|   local_dir: build/html | ||||
|   on: | ||||
|     branch: master | ||||
		Reference in New Issue
	
	Block a user