Repository navigation
48 lines (39 loc) · 1.6 KB
/
Copy pathdeploy.yml
File metadata and controls
48 lines (39 loc) · 1.6 KB
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
48
name: Build and Deploy Doc to S3
on:
# push:
# branches:
# - main
workflow_dispatch: # Allows manual execution from the GitHub Actions UI
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x" # Ensures a recent Python version
- name: Install MkDocs
run: pip install mkdocs
- name: Install SkedGo MkDocs theme
run: pip install git+https://github.com/skedgo/skedgo-mkdocs-theme
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18 # Change to your desired Node.js version
cache: "npm"
- name: Install dependencies
run: npm install --force
- name: Build project doc
run: npm run build:doc
- name: Upload to S3
uses: jakejarvis/s3-sync-action@v0.5.1
with:
args: --delete # Deletes old files in S3 that are not in the new build
env:
AWS_S3_BUCKET: ${{ secrets.DOC_AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.DOC_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.DOC_AWS_SECRET_ACCESS_KEY }}
AWS_REGION: "us-east-1" # Change this to your AWS region
SOURCE_DIR: "docs/site" # Change if your build folder is different