Skip to content

Commit 7fb2e19

Browse files
committed
build: push release versions to s3
1 parent 6854211 commit 7fb2e19

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/build.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,45 @@ jobs:
5555
path: _build/latex/*.pdf
5656
retention-days: 14
5757

58+
upload:
59+
runs-on: ubuntu-latest
60+
name: Upload rendered site
61+
needs: build-html-man-pdf
62+
environment: github-pages
63+
if: github.event_name == 'push' && github.ref_type == 'tag'
64+
steps:
65+
66+
- name: Prepare site (html)
67+
uses: actions/download-artifact@v4
68+
with:
69+
name: html
70+
path: _site
71+
72+
- name: Prepare site (man)
73+
uses: actions/download-artifact@v4
74+
with:
75+
name: man
76+
path: _site/man
77+
78+
- name: Prepare site (pdf)
79+
uses: actions/download-artifact@v4
80+
with:
81+
name: man
82+
path: _site/man
83+
84+
- name: Upload rendered site
85+
uses: docker://docker.io/rclone/rclone:latest
86+
env:
87+
RCLONE_CONFIG_OBJSTORE_TYPE: s3
88+
RCLONE_CONFIG_OBJSTORE_PROVIDER: ${{ secrets.S3_PROVIDER }}
89+
RCLONE_CONFIG_OBJSTORE_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }}
90+
RCLONE_CONFIG_OBJSTORE_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY }}
91+
RCLONE_CONFIG_OBJSTORE_ENDPOINT: ${{ secrets.S3_ENDPOINT }}
92+
RCLONE_CONFIG_OBJSTORE_REGION: ${{ secrets.S3_REGION }}
93+
RCLONE_CONFIG_OBJSTORE_ACL: public-read
94+
with:
95+
args: sync _site objstore:${{ secrets.S3_BUCKET }}/${{ github.ref_name }}
96+
5897
publish:
5998
runs-on: ubuntu-latest
6099
name: Publish to GitHub pages

0 commit comments

Comments
 (0)