Skip to content

Commit

Permalink
Revert "ci: use containers instead of installing texlive-full in each…
Browse files Browse the repository at this point in the history
… run"

This reverts commit c304520.
  • Loading branch information
rw1nkler committed Oct 20, 2023
1 parent c229ef0 commit 05c015e
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 35 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/ghpages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: GH Pages

on:
pull_request:
push:
branches:
- main

jobs:
docs-generation:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y texlive-full
python3 -m pip install -r docs/requirements.txt
- name: Generate documentation
run: |
cd docs
make html latexpdf
cp build/latex/*.pdf build/html/
- uses: actions/upload-artifact@v3
with:
name: gh-page
path: docs/build/html

- name: Deploy to Github Pages
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
run: |
cd docs/build/html
touch .nojekyll
git init
cp ../../../.git/config ./.git/config
git add .
git config --local user.email "push@gha"
git config --local user.name "GHA"
git commit -am "update ${{ github.sha }}"
git push -u origin +HEAD:gh-pages
rm -rf .git
35 changes: 0 additions & 35 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,38 +97,3 @@ jobs:
with:
name: top.bit
path: top.bit

Docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: docker://btdi/sphinx:min
with:
args: ./.github/scripts/sphinx.sh

- uses: docker://btdi/latex
with:
args: ./.github/scripts/latex.sh

- name: 'Upload artifact: Sphinx HTML and PDF'
uses: actions/upload-artifact@v3
with:
name: Documentation
path: docs/build/html

- name: Deploy to Github Pages
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
run: |
sudo chown -R $(whoami) docs
cd docs/build/html
touch .nojekyll
git init
cp ../../../.git/config ./.git/config
git add .
git config --local user.email "push@gha"
git config --local user.name "GHA"
git commit -am "update ${{ github.sha }}"
git push -u origin +HEAD:gh-pages
rm -rf .git

0 comments on commit 05c015e

Please sign in to comment.