forked from github.com/GenderDysphoria.fyi
Update CI
This commit is contained in:
@@ -45,7 +45,12 @@ jobs:
|
|||||||
name: Use Node.js
|
name: Use Node.js
|
||||||
uses: https://github.com/actions/setup-node@v2
|
uses: https://github.com/actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '20'
|
||||||
|
-
|
||||||
|
name: Install Chrome
|
||||||
|
run: |
|
||||||
|
wget https://dl.google.com/linux/direct/google-chrome-stable_current_arm64.deb
|
||||||
|
sudo apt install ./google-chrome-stable_current_arm64.deb
|
||||||
-
|
-
|
||||||
name: Install node dependencies
|
name: Install node dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
@@ -58,11 +63,79 @@ jobs:
|
|||||||
-
|
-
|
||||||
name: Copy dist to docker...
|
name: Copy dist to docker...
|
||||||
run: npm cache clean --force;cp -a dist docker/.docker/dist
|
run: npm cache clean --force;cp -a dist docker/.docker/dist
|
||||||
|
# -
|
||||||
|
# name: Use Node.js
|
||||||
|
# uses: https://github.com/actions/setup-node@v2
|
||||||
|
# with:
|
||||||
|
# node-version: '20'
|
||||||
-
|
-
|
||||||
name: Use Node.js
|
name: (EN) Generate PDF from HTML
|
||||||
uses: https://github.com/actions/setup-node@v2
|
run: |
|
||||||
|
google-chrome --headless --print-to-pdf-no-header \
|
||||||
|
--run-all-compositor-stages-before-draw --print-to-pdf="${{ gitea.workspace }}/dist/en.pdf" \
|
||||||
|
http://127.0.0.1:8080/en/printable/index.html
|
||||||
|
|
||||||
|
-
|
||||||
|
name: (ZH) Generate PDF from HTML
|
||||||
|
run: |
|
||||||
|
google-chrome --headless --print-to-pdf-no-header \
|
||||||
|
--run-all-compositor-stages-before-draw --print-to-pdf="${{ gitea.workspace }}/dist/zh.pdf" \
|
||||||
|
http://127.0.0.1:8080/zh/printable/index.html
|
||||||
|
|
||||||
|
-
|
||||||
|
name: (DE) Generate PDF from HTML
|
||||||
|
run: |
|
||||||
|
google-chrome --headless --print-to-pdf-no-header \
|
||||||
|
--run-all-compositor-stages-before-draw --print-to-pdf="${{ gitea.workspace }}/dist/de.pdf" \
|
||||||
|
http://127.0.0.1:8080/de/druckbar/index.html
|
||||||
|
|
||||||
|
-
|
||||||
|
name: (HU) Generate PDF from HTML
|
||||||
|
run: |
|
||||||
|
google-chrome --headless --print-to-pdf-no-header \
|
||||||
|
--run-all-compositor-stages-before-draw --print-to-pdf="${{ gitea.workspace }}/dist/hu.pdf" \
|
||||||
|
http://127.0.0.1:8080/hu/nyomtathato/index.html
|
||||||
|
|
||||||
|
-
|
||||||
|
name: (PL) Generate PDF from HTML
|
||||||
|
run: |
|
||||||
|
google-chrome --headless --print-to-pdf-no-header \
|
||||||
|
--run-all-compositor-stages-before-draw --print-to-pdf="${{ gitea.workspace }}/dist/pl.pdf" \
|
||||||
|
http://127.0.0.1:8080/pl/do-druku/index.html
|
||||||
|
|
||||||
|
-
|
||||||
|
name: (PT) Generate PDF from HTML
|
||||||
|
run: |
|
||||||
|
google-chrome --headless --print-to-pdf-no-header \
|
||||||
|
--run-all-compositor-stages-before-draw --print-to-pdf="${{ gitea.workspace }}/dist/pt.pdf" \
|
||||||
|
http://127.0.0.1:8080/pt/imprimivel/index.html
|
||||||
|
|
||||||
|
-
|
||||||
|
name: (FR) Generate PDF from HTML
|
||||||
|
run: |
|
||||||
|
google-chrome --headless --print-to-pdf-no-header \
|
||||||
|
--run-all-compositor-stages-before-draw --print-to-pdf="${{ gitea.workspace }}/dist/fr.pdf" \
|
||||||
|
http://127.0.0.1:8080/fr/a-imprimer/index.html
|
||||||
|
|
||||||
|
-
|
||||||
|
name: (NL) Generate PDF from HTML
|
||||||
|
run: |
|
||||||
|
google-chrome --headless --print-to-pdf-no-header \
|
||||||
|
--run-all-compositor-stages-before-draw --print-to-pdf="${{ gitea.workspace }}/dist/nl.pdf" \
|
||||||
|
http://127.0.0.1:8080/nl/afdrukbaar/index.html
|
||||||
|
|
||||||
|
-
|
||||||
|
name: List dist
|
||||||
|
run: ls -la ${{ gitea.workspace }}/dist
|
||||||
|
|
||||||
|
-
|
||||||
|
name: Upload PDFs
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
node-version: '20'
|
name: site-pdfs
|
||||||
|
path: |
|
||||||
|
${{ gitea.workspace }}/dist/**.pdf
|
||||||
|
retention-days: 365
|
||||||
-
|
-
|
||||||
name: Build and push docker image to gitea package store
|
name: Build and push docker image to gitea package store
|
||||||
uses: https://github.com/docker/build-push-action@v5
|
uses: https://github.com/docker/build-push-action@v5
|
||||||
@@ -80,7 +153,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: build_artifact
|
name: build_artifact
|
||||||
path: artifact.7z
|
path: artifact.7z
|
||||||
retention-days: 7
|
retention-days: 365
|
||||||
job2:
|
job2:
|
||||||
needs: job1
|
needs: job1
|
||||||
name: Connect to deployment host, update, and redeploy docs website.
|
name: Connect to deployment host, update, and redeploy docs website.
|
||||||
|
|||||||
Reference in New Issue
Block a user