-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (43 loc) · 1.14 KB
/
docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Documentation
on:
pull_request:
branches: [ "main" ]
push:
tags:
- "v*.*.*"
workflow_dispatch:
permissions:
contents: read
jobs:
docs:
name: Build Documentation
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
fetch-tags: true
- name: Set up Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 20
- name: Make docs
run: |
make docs
- name: Set up s3cmd
uses: s3-actions/s3cmd@702f629ce32a0c60522075f4bc211aa02989adea # v1.9.0
if: github.event_name != 'pull_request'
with:
provider: aws
region: ${{ secrets.S3_REGION }}
access_key: ${{ secrets.S3_ACCESS_KEY }}
secret_key: ${{ secrets.S3_SECRET_KEY }}
- name: Upload to s3
if: github.event_name != 'pull_request'
env:
BUCKET: ${{ secrets.S3_BUCKET }}
run: |
s3cmd sync --recursive --delete-removed build/site/* s3://${BUCKET}/