Skip to content

Commit 537992c

Browse files
committed
build: push release versions to s3
1 parent 6854211 commit 537992c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/build.yml

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

58+
- name: Prepare rendered site
59+
if: github.event_name == 'push' && github.ref_type == 'tag'
60+
run: |
61+
mv _build/html _site
62+
mv _build/man _site/man
63+
mkdir _site/pdf
64+
mv _build/latest/*pdf _site/pdf
65+
66+
- name: Upload rendered site
67+
uses: docker://docker.io/rclone/rclone:latest
68+
if: github.event_name == 'push' && github.ref_type == 'tag'
69+
env:
70+
RCLONE_CONFIG_OBJSTORE_TYPE: s3
71+
RCLONE_CONFIG_OBJSTORE_PROVIDER: ${{ secrets.S3_PROVIDER }}
72+
RCLONE_CONFIG_OBJSTORE_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }}
73+
RCLONE_CONFIG_OBJSTORE_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY }}
74+
RCLONE_CONFIG_OBJSTORE_ENDPOINT: ${{ secrets.S3_ENDPOINT }}
75+
RCLONE_CONFIG_OBJSTORE_REGION: ${{ secrets.S3_REGION }}
76+
with:
77+
args: sync _site objstore:${{ secrets.S3_BUCKET }}/${{ github.ref_name }}
78+
5879
publish:
5980
runs-on: ubuntu-latest
6081
name: Publish to GitHub pages

0 commit comments

Comments
 (0)