File tree Expand file tree Collapse file tree 3 files changed +42
-59
lines changed Expand file tree Collapse file tree 3 files changed +42
-59
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ name : Build
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - site
7
+ workflow_dispatch :
8
+
9
+ jobs :
10
+ tests :
11
+ uses : pytorch/test-infra/.github/workflows/linux_job.yml@main
12
+ with :
13
+ runner : linux.12xlarge
14
+ repository : pytorch/pytorch.github.io
15
+ docker-image : cimg/ruby:2.7-node
16
+ secrets-env : PYTORCHBOT_TOKEN
17
+ script : |
18
+ git config --global --add safe.directory /__w/pytorch.github.io/pytorch.github.io
19
+ set -euxo pipefail
20
+
21
+ ## Bundle Install
22
+ cd
23
+ mkdir .bundle
24
+ bundle config path '~/vendor/bundle'
25
+ git clone https://github.com/pytorch/pytorch.github.io.git
26
+ cd pytorch.github.io
27
+ bundle install
28
+
29
+ ## Yarn Install
30
+ yarn install --cache-folder ~/.cache/yarn
31
+
32
+ ## Notedown Install
33
+ sudo apt update && sudo apt install python3-pip && sudo -H pip3 install pyrsistent==0.16 notedown pyyaml -Iv nbformat==5.7
34
+
35
+ ## Configure Bot
36
+ git config --global user.email "facebook-circleci-bot@users.noreply.github.com"
37
+ git config --global user.name "Website Deployment Script"
38
+
39
+ ## Build Jekyll site and push to master
40
+ ./scripts/deploy-site.sh build
Original file line number Diff line number Diff line change 5
5
# Used with their MIT license https://github.com/eldarlabs/ghpages-deploy-script/blob/master/LICENSE
6
6
7
7
# abort the script if there is a non-zero error
8
- set -e
8
+ set -ex
9
9
10
10
# initialize hub submodule
11
11
git submodule deinit -f . && git submodule update --init --recursive
@@ -57,7 +57,7 @@ git add -A
57
57
# now commit, ignoring branch master doesn't seem to work, so trying skip
58
58
git commit --allow-empty -m " Deploy to GitHub Pages on master [ci skip]"
59
59
# and push, but send any output to /dev/null to hide anything sensitive
60
- git push --force --quiet https://facebook-circleci-bot: $CIRCLECI_PUBLISH_TOKEN @github.com/pytorch/pytorch.github.io.git master
60
+ git push --force --quiet https://pytorchbot: $PYTORCHBOT_TOKEN @github.com/pytorch/pytorch.github.io.git master
61
61
# go back to where we started and remove the master git repo we made and used
62
62
# for deployment
63
63
cd ..
You can’t perform that action at this time.
0 commit comments