-
Notifications
You must be signed in to change notification settings - Fork 200
39 lines (39 loc) · 1.36 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
name: Build IHP Documentation and API Reference
on:
push:
branches: 'master'
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=https://github.com/NixOS/nixpkgs/archive/d899609c2a22bbd345d2ed200c6ebc08a772ccc9.tar.gz
- uses: cachix/cachix-action@v14
with:
name: digitallyinduced
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-1
- name: Build Docs
run: |
cd $GITHUB_WORKSPACE
nix develop --impure --command build-guide
- name: Build API Reference
run: |
cd $GITHUB_WORKSPACE
nix develop --impure --command build-api-reference
tar -czvf api-reference.tar.gz haddock-build
- name: Uploading to S3
run: |
aws s3 cp ./Guide/guide.tar.gz s3://${{ secrets.S3_BUCKET }}/docs/guide.tar.gz
aws s3 cp ./api-reference.tar.gz s3://${{ secrets.S3_BUCKET }}/docs/api-reference.tar.gz