Skip to content

Commit ab66bc5

Browse files
authored
Create staging.yml (#50)
1 parent db9f90b commit ab66bc5

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/staging.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: PyTorch Tutorial Staging
2+
3+
on:
4+
push:
5+
branches:
6+
- seth-blitz
7+
- learn-link-cassie
8+
jobs:
9+
tutorial-staging:
10+
runs-on: ubuntu-latest
11+
env:
12+
WEB_PATH: $web
13+
ACCOUNT: ${{ secrets.stagingaccount }}
14+
KEY: ${{ secrets.stagingkey }}
15+
SOURCEDIR: .
16+
BUILDDIR: _build/html
17+
steps:
18+
- uses: actions/checkout@v2
19+
- uses: actions/setup-python@v2
20+
with:
21+
python-version: 3.6
22+
-
23+
# install requirements
24+
name: install requirements
25+
run: |
26+
pip install --no-cache-dir -r requirements.txt
27+
-
28+
# build site
29+
name: sphinx build
30+
run: |
31+
sphinx-build -D plot_gallery=0 -b html "$SOURCEDIR" "$BUILDDIR"
32+
-
33+
# clear old site
34+
name: clear old site
35+
run : |
36+
az storage blob delete-batch --source $WEB_PATH --account-name $ACCOUNT --account-key $KEY
37+
-
38+
# push to azure storage
39+
name: push to azure storage
40+
run : |
41+
az storage blob upload-batch -s $BUILDDIR -d $WEB_PATH --account-name $ACCOUNT --account-key $KEY

0 commit comments

Comments
 (0)