Skip to content

Commit ea546bf

Browse files
committed
Moving Site Deployment script to GHA
1 parent 2149192 commit ea546bf

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/build.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Unit-tests on Linux CPU
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- site
8+
workflow_dispatch:
9+
10+
jobs:
11+
tests:
12+
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
13+
with:
14+
runner: linux.12xlarge
15+
repository: pytorch/pytorch.github.io
16+
docker-image: cimg/ruby:2.7-node
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+
bundle config set --local path 'vendor/bundle'
23+
bundle install
24+
25+
## Yarn Install
26+
yarn install --cache-folder ~/.cache/yarn
27+
28+
## Notedown Install
29+
sudo apt update && sudo apt install python3-pip && sudo -H pip3 install pyrsistent==0.16 notedown pyyaml -Iv nbformat==5.7
30+
31+
## Configure Bot
32+
git config --global user.email "facebook-circleci-bot@users.noreply.github.com"
33+
git config --global user.name "Website Deployment Script"
34+
35+
## Build Jekyll site and push to master
36+
./scripts/deploy-site.sh build

0 commit comments

Comments
 (0)