forked from whatwg/html
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (36 loc) · 1.16 KB
/
build-deploy.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
name: Build & Deploy
on:
push:
branches:
- main
jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 2
path: "source"
- name: Build
run: |
mkdir output
docker run --mount "type=bind,source=$GITHUB_WORKSPACE/source,destination=/imhele/html,readonly=1" \
--env "HTML_SOURCE=/imhele/html" \
--mount "type=bind,source=$GITHUB_WORKSPACE/output,destination=/imhele/output" \
--env "HTML_OUTPUT=/imhele/output" \
imhele/html-build
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Set up OSS Python SDK
run: pip install oss2
- name: Deploy
env:
AccessKeyId: ${{ secrets.ALIYUN_ACCESS_KEY_ID }}
AccessKeySecret: ${{ secrets.ALIYUN_ACCESS_KEY_SECRET }}
EndPoint: ${{ secrets.ALIYUN_OSS_END_POINT }}
BucketName: ${{ secrets.ALIYUN_OSS_BUCKET_NAME }}
run: python $GITHUB_WORKSPACE/source/deploy-oss.py