Skip to content

Commit

Permalink
Merge pull request #8 from SpinalHDL/ci
Browse files Browse the repository at this point in the history
Fix github action deployment using docker
  • Loading branch information
Dolu1990 authored Nov 28, 2024
2 parents 20f99b5 + eac60de commit 50df064
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 24 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,14 +256,14 @@ jobs:
fi
# See if a tags/latest exists
if git show-ref -q latest
then
echo "$(git show-ref ${sphinx_extra_version}) ## ALREADY EXISTS, KEEPING"
else
gitref=$(git show-ref ${sphinx_latest_version} | cut -d ' ' -f1)
git tag "${sphinx_extra_version}" "${gitref}"
echo "$(git show-ref ${sphinx_extra_version}) ## CREATED LOCAL ALIAS TO ${sphinx_latest_version}"
fi
#if git show-ref -q latest
#then
# echo "$(git show-ref ${sphinx_extra_version}) ## ALREADY EXISTS, KEEPING"
#else
# gitref=$(git show-ref ${sphinx_latest_version} | cut -d ' ' -f1)
# git tag "${sphinx_extra_version}" "${gitref}"
# echo "$(git show-ref ${sphinx_extra_version}) ## CREATED LOCAL ALIAS TO ${sphinx_latest_version}"
#fi
# Now we are all configured lets make these settings global
for varname in DEPLOY_ENV_TEST DEPLOY_ENV_LIVE
Expand Down
32 changes: 18 additions & 14 deletions .github/workflows/push-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,26 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: "setup python"
uses: actions/setup-python@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build docker image
uses: docker/build-push-action@v3
with:
python-version: 3.9
- name: "install dependencies"
context: .
load: true
push: false
cache-to: type=gha
cache-from: type=gha
tags: vexiiriscv-pdf
file: pdf.Dockerfile
- name: Check links
run: docker run --rm -u $(id -u $USER):$(id -g $USER) -v $PWD:/docs -e sphinx_html_baseurl -e sphinx_github_url vexiiriscv-pdf make linkcheck
- name: Build multiversioned doc
run: docker run --rm -u $(id -u $USER):$(id -g $USER) -v $PWD:/docs -e sphinx_html_baseurl -e sphinx_github_url vexiiriscv-pdf sphinx-multiversion source docs/html
- name: Add .nojekill
run: sudo touch docs/html/.nojekyll
- name: Add redirection to master
run: |
sudo apt-get update -y
sudo apt-get install -y git latexmk texlive-latex-extra
sudo pip install -r requirements.txt
- name: "check links"
run: make linkcheck
- name: "Build multiversioned doc"
run: sphinx-multiversion source docs/html
- name: "add .nojekill and redirect to master"
run: |
sudo touch docs/html/.nojekyll
sudo tee docs/html/index.html << EOF
<!DOCTYPE html>
<html>
Expand Down
2 changes: 1 addition & 1 deletion pdf.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM sphinxdoc/sphinx-latexpdf
FROM sphinxdoc/sphinx-latexpdf:5.3.0

WORKDIR /docs

Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ sphinx-rtd-theme==1.2.1
sphinxcontrib-wavedrom==3.0.4
sphinx-multiversion @ git+https://github.com/samuel-emrys/sphinx-multiversion.git@cd723351f687c98d32834226ae7b3ec9e63bcba5
sphinx-copybutton==0.5.2
sphinx-intl==2.1.0

0 comments on commit 50df064

Please sign in to comment.